{"id":13862751,"url":"https://github.com/arnested/php-extras","last_synced_at":"2025-07-26T16:11:21.418Z","repository":{"id":3744754,"uuid":"4819221","full_name":"arnested/php-extras","owner":"arnested","description":"Extra features for Emacs `php-mode'.","archived":false,"fork":false,"pushed_at":"2023-07-16T11:13:28.000Z","size":72,"stargazers_count":32,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-06T12:36:23.254Z","etag":null,"topics":["emacs","hacktoberfest","php"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arnested.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-06-28T10:15:52.000Z","updated_at":"2024-06-15T05:25:05.000Z","dependencies_parsed_at":"2024-08-05T06:05:46.888Z","dependency_job_id":"46ef7ef2-d2b1-42be-9e22-35096fd17802","html_url":"https://github.com/arnested/php-extras","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/arnested/php-extras","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnested%2Fphp-extras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnested%2Fphp-extras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnested%2Fphp-extras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnested%2Fphp-extras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arnested","download_url":"https://codeload.github.com/arnested/php-extras/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnested%2Fphp-extras/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267191054,"owners_count":24050318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emacs","hacktoberfest","php"],"created_at":"2024-08-05T06:01:51.666Z","updated_at":"2025-07-26T16:11:21.360Z","avatar_url":"https://github.com/arnested.png","language":"Emacs Lisp","readme":"# PHP Extras\n\nA small collection of extra features for Emacs `php-mode`.\n\nCurrently includes:\n\n  * `php-extras-insert-previous-variable`\n  * `php-extras-eldoc-documentation-function`\n  * Auto complete source for PHP functions based on\n    `php-extras-eldoc-documentation-function`\n  * Company completion back-end for PHP functions based on\n    `php-extras-eldoc-documentation-function`\n\n\n## `php-extras-insert-previous-variable`\n\nWhen variable names get too long or you have to juggle a lot of nested\narrays it gets cumbersome to repeat the same variables over and over\nagain while programming.\n\nIn example you have the code below and want to debug what value you\nactually parsed to `some_function()`. You have point at `^` and now\nall you have to write is repeat the variable...\n\n```php\nsome_function($my_array['some_level'][0]['another_level'][7]);\nprint_r(^);\n```\n\nEnter `php-extras` and you just hit \u003ckbd\u003eC-c C-$\u003c/kbd\u003e and it will\ninsert the previous variable (including array indexes).\n\nIf you prefix the command (i.e. \u003ckbd\u003eC-u 3 C-c C-$\u003c/kbd\u003e) it will\nsearch back 3 variables and with negative prefix arguments it will\nsearch forward.\n\n\n## `php-extras-eldoc-documentation-function`\n\n`eldoc-mode` is a nice minor mode that ships with Emacs. It will\ndisplay a function tip in the mini buffer showing the function and its\narguments for the function at point. That is if you provide a function\nto look up the function definition.\n\n`php-extras` provides such a function for looking up all the core PHP\nfunctions.\n\nThe function `php-extras-generate-eldoc` will download the\n[PHP function list](http://doc.php.net/downloads/json/php_manual_en.json)\nand extract the function definitions (slow) and store them in a hash\ntable on disk for you.\n\nIf you install `php-extras` as an ELPA package from\n[Marmalade](http://marmalade-repo.org/packages/php-extras) the hash\ntable is already generated for you.\n\n\n## Auto complete source for PHP functions based\n\nThe PHP functions extracted for\n`php-extras-eldoc-documentation-function` is also setup as a source for\n[auto-complete](http://cx4a.org/software/auto-complete).\n\n[auto-complete](http://cx4a.org/software/auto-complete) already comes\nwith a dictionary of PHP functions and will auto complete on them\nusing the `ac-source-dictionary`.\n\nThe source we provide with `php-extras` will hopefully be more up to\ndate.\n\n\n## Company completion back-end for PHP functions based\n\nUsers of [company-mode](http://company-mode.github.io/) will also get\nin-buffer  completion based on the extracted PHP functions.\n\n\n## Installation\n\nThe easiest way to install `php-extras` is probably to install it via\nthe ELPA archive at\n[Marmalade](http://marmalade-repo.org/packages/php-extras).\n\nELPA (package.el) is part of Emacs 24. For Emacs 23 see\n[Marmalade](http://marmalade-repo.org) for installation instructions.\n\nThe version number of the ELPA package will have the date appended\nwhen the package was build and hence the date the documentation got\nextracted from [php.net](http://php.net).\n\n\n### Manual installation\n\nI really recommend that you install this package via ELPA as\ndescribed above.\n\nIf you insist on installing it manually try to follow this recipe:\n\n* Place the folder with the files somewhere on your disk.\n\n* Add this to your `.emacs` / `.emacs.d/init.el`:\n\n```lisp\n(add-to-list 'load-path \"/somewhere/on/your/disk/php-extras\")\n(eval-after-load 'php-mode\n  (require 'php-extras))\n```\n\n* Either restart your Emacs or evaluate the `add-to-list` expression.\n\n* Generate the hash table containing the PHP functions:\n\n   \u003ckbd\u003eM-x load-library RET php-extras-gen-eldoc RET\u003c/kbd\u003e\n\n   \u003ckbd\u003eM-x php-extras-generate-eldoc RET\u003c/kbd\u003e\n\n\n## Development of PHP Extras\n\nPHP Extras is developed at\n[GitHub](https://github.com/arnested/php-extras).  Feature requests,\nideas, bug reports, and pull request are more than welcome!\n","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnested%2Fphp-extras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnested%2Fphp-extras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnested%2Fphp-extras/lists"}