When a variable on the console is set export VARIABLE=VALUE; You can get it from PHP Command line (CLI) using getenv(‘VARIABLE’) Example #script.php <?php var_dump(getenv(‘VAR’)); ?> From command line php -f script.php //bool(false) export VAR=a;Â php -f script.php //string(1) “a”
Archive for the ‘PHP tools’ Category
Useful options for PHP Command line interface
I find PHP command line interface very useful, for CRON jobs, testing and whenever apache is not necessary. Basic commands here:Â CLI php.net manual. In this article I’m writing some CL flags and few lines of related functions / PHP code I find useful To make script interactive and read the line from the console $var [...]
Netbeans 7.0 for PHP – Keyboard shortcuts
Netbeans PHP 7.0 includes a powerful refactoring tool, support for PHP aliases and PHPDoc generation (not tested yet). I think when xdebug watching feature will become stable, Netbeans  - currently my favourite – will be a fully-featured PHP IDE, probably the best free alternative to Zend Studio. Netbeans PHP was initially created for Java and [...]
Eclipse hangs on SVN commit
I’m currently using Eclipse PDT at work (build 20100917-0705). I usually prefer Netbeans as more stable and with more or less the same features, but the application I’m working on contains a huge amount of classes and the eclipse quick search (open resource) is extremely useful to navigate and open files (currently better and faster [...]
Xdebug debug with Netbeans on Linux
XDebug is a free PHP extension to debug variables of your applications. Combined with Netbeans for PHP debug features (break points, variable watching and flow execution navigation, see screenshot on the left), it allows to have a complete debug environment. What it’s really interesting is the possibility to place breakpoints in any file, even though [...]
Dropbox, a swiss-knife tool for developers
Among the tools I consider useful, Dropbox is one ! It offers a free online storage space of 2 Gb with automatic synchronization with local directory and versioning ! I personally use to keep my digital books, guides, code snippets, software (php, apache, mysql, portable graphic software, IDEs, etc…) between two houses and workplace. Nice features [...]
Free web-based software for project management
After being part of a new team that works with outsourcing team with dynamic allocation of resources (developers) without using a software to plan and schedule the project, I’m now interested in experimenting some free web-based software for project management [project magement wiki]. As expected, the awesome wikipedia contains a page about the software used [...]
The power of the Regular expression on the web
Regular Expression are Swiss-knife tools developers should know, extremely useful for  web-purposes and unavoidable when dealing with content scraping. A single call of a preg_match_all with a medium complex regular expression could save hundres of LOC and time as well as obtaining much more maintainable code. There  are advanced features like subpatterns and conditional expressions. They [...]
Zend tool not working after Netbeans 6.9 setup
Netbeans 6.9 modifies the zend framework tool and adds an additional class in order to use it directly from the IDE. The problem is that Netbeans changes the common INI file of the tool (.zf.ini placed inside the user folder). Without specifying additional parameters, the tool does not work anymore from the external command line. [...]
Netbeans 6.8
Netbeans 6.8 is now available !New features: Symfony support (integrated prompt, syntax + help for command line code generator, shortucts) + YAML syntax support better code completion, supporting PHP 5.3 features (namespaces) PHPUnit improvements PHP application from remote servers SQL better auto completition Embedded Browser + Web Preview for HTML and CSS
RSS Feed
Twitter
Posted in
Tags: 