InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search
  • Home
  • > Tutorials
  • > PHP cookbook

PHP command line – show errors

By admin on Nov 29, 2015

To show errors on php command line (cli) without changing php.ini

php -d error_reporting=E_ALL code1.php

Sample php code code1.php

<?php
echo $non_existing_var;
?>

Sample output

php cli default case

$ php code1.php 
// No output if php.ini is not set for cli

php cli with error_reporting

$ php -d error_reporting=E_ALL code1.php 

Notice: Undefined variable: non_existing_var in /opt/tmp/code1.php on line 2

Suggested posts:

  1. Perl command line – replace multi line comments
  2. HTML5 – video tag
  3. Convert mp3 to ogg on Mac using ffmpeg
  4. AngularJS format date using date filter
  5. How to upload closed captions for your youtube video
  6. AngularJS hello world example
  7. Embed youtube video with javascript on-click lazy loading approach
  8. Vim mini cheat sheet – handy commands reference
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Linux/Unix Command Line, PHP, PHP cookbook, Tutorials
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress