{"id":28874,"date":"2018-10-22T09:44:23","date_gmt":"2018-10-22T07:44:23","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=28874"},"modified":"2018-10-22T09:44:23","modified_gmt":"2018-10-22T07:44:23","slug":"the-land-where-php-uses-eval","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2018\/10\/22\/the-land-where-php-uses-eval\/","title":{"rendered":"The Land Where PHP Uses eval()"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>&#8220;<a href=\"https:\/\/www.exakat.io\/land-where-php-uses-eval\/\">The Land Where PHP Uses eval()<\/a>&#8221; is an interesting post powered by the study of 2,000 Open Source PHP projects.\u00a0 It details a number of scenarios where developers have used the <a href=\"http:\/\/php.net\/manual\/en\/function.eval.php\">eval()<\/a> function and suggests the better ways for most of these.\u00a0 Despite of how dangerous and inefficient the <em>eval()<\/em> is in PHP, there are still good reasons to use it in some cases.\u00a0 Read the full post to see which are those.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>&#8220;The Land Where PHP Uses eval()&#8221; is an interesting post powered by the study of 2,000 Open Source PHP projects.\u00a0 It details a number of scenarios where developers have used the eval() function and suggests the better ways for most of these.\u00a0 Despite of how dangerous and inefficient the eval() is in PHP, there are &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2018\/10\/22\/the-land-where-php-uses-eval\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The Land Where PHP Uses eval()<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"The Land Where PHP Uses eval() #WebDev #PHP #BestPracticies #security","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,18,62,1334],"tags":[3069,38,200,1330],"keyring_services":[],"class_list":["post-28874","post","type-post","status-publish","format-standard","hentry","category-general","category-programming","category-technology","category-web-work","tag-best-practices","tag-php","tag-security","tag-web-development"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":29009,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/11\/23\/stack-overflow-buddy\/","url_meta":{"origin":28874,"position":0},"title":"Stack Overflow Buddy","author":"Leonid Mamchenkov","date":"November 23, 2018","format":false,"excerpt":"An innocent joke on Facebook brought in something really golden - Stack Overflow Buddy.\u00a0 It is a fun PHP library for all those of you who search for code examples on Stack Overflow and then copy-paste those into your projects. Wow, how's it work? If you're impressed, you should probably\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/11\/developer.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":7369,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/03\/23\/calculator-at-hand\/","url_meta":{"origin":28874,"position":1},"title":"Calculator at hand","author":"Leonid Mamchenkov","date":"March 23, 2004","format":false,"excerpt":"UNIX shell is excellent. The toolbox at hand also never stop to amaze. But sometimes there is this feeling that something is missing. No matter how many tools are there, you'll still want something special and personalized. I am pretty often missing the calculator. Of course, there are xcalc and\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28923,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/11\/10\/php-is-deadviva-le-php\/","url_meta":{"origin":28874,"position":2},"title":"PHP is dead\u2026Viva le PHP!","author":"Leonid Mamchenkov","date":"November 10, 2018","format":false,"excerpt":"Here's a great post on why all those \"PHP is dead\" blog posts and forum threads are a complete load of crap. Here\u2019s the reality: nearly 80% of the internet is running on PHP as of 2018. I guess PHP isn\u2019t that dead after all. PHP doesn\u2019t scale. Riiiiiight. Wikipedia\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/11\/php-500x335.jpeg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":26306,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/08\/04\/504-gateway-timeout-error-on-nginx-fastcgi-php-fpm\/","url_meta":{"origin":28874,"position":3},"title":"504 Gateway Timeout error on Nginx + FastCGI (php-fpm)","author":"Leonid Mamchenkov","date":"August 4, 2016","format":false,"excerpt":"\"504 Gateway Timeout\" error is a very common issue when using Nginx with PHP-FPM. \u00a0Usually, that means that it took PHP-FPM longer to generate the response, than Nginx was willing to wait for. \u00a0A few possible reasons for this are: Nginx timeout configuration uses very small values (expecting the responses\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"504","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/08\/504-500x385.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":28559,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/05\/08\/composer-plugin-qa-composer-plugin-for-php-quality-assurance-tools\/","url_meta":{"origin":28874,"position":4},"title":"composer-plugin-qa &#8211; Composer Plugin for PHP Quality Assurance Tools","author":"Leonid Mamchenkov","date":"May 8, 2018","format":false,"excerpt":"composer-plugin-qa is a Composer plugin which adds all the most popular PHP quality assurance tools as composer scripts, so that you don't have to install and set them up one by one.\u00a0 The list of tools includes the following: PHPUnit: Testing Framework PHPCOV: CLI frontend for the\u00a0PHP_CodeCoverage Paratest: Parallel testing\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/05\/composer-plugin-qa-500x296.jpeg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":22700,"url":"https:\/\/mamchenkov.net\/wordpress\/2014\/10\/22\/url-rewriting-in-built-in-web-server-of-php\/","url_meta":{"origin":28874,"position":5},"title":"URL rewriting in built-in web server of PHP","author":"Leonid Mamchenkov","date":"October 22, 2014","format":false,"excerpt":"PHP comes with a handy for development built-in web server. \u00a0However, most web projects have friendly URLs these days which are either Apache (mod_rewrite) or Nginx specific configuration. \u00a0This almost renders built-in PHP web server useless. \u00a0Unless you provide a PHP-based routing, like so: Start the PHP web server with\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/28874","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=28874"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/28874\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=28874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=28874"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=28874"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=28874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}