3v4l.org

run code in 300+ PHP versions simultaneously
<?php $main_teaser = "Containerdienst {{stadt}} - Container günstig mieten"; $arr_main_teaser = print_r(str_word_count($main_teaser, 1, '{}äüß')); if(in_array("{{stadt}}", $arr_main_teaser)) { $key = array_search('{{stadt}}', $arr_main_teaser); $replace = array($key => ucfirst($input->urlSegment1)); $new_main_teaser = array_replace($arr_main_teaser, $replace); print_r($new_main_teaser); } ?>
Output for git.master, git.master_jit
Array ( [0] => Containerdienst [1] => {{stadt}} [2] => - [3] => Container [4] => günstig [5] => mieten ) Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in /in/eEDAg:6 Stack trace: #0 /in/eEDAg(6): in_array('{{stadt}}', true) #1 {main} thrown in /in/eEDAg on line 6
Process exited with code 255.
Output for rfc.property-hooks
Array ( [0] => Containerdienst [1] => {{stadt}} [2] => - [3] => Container [4] => günstig [5] => mieten ) Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, true given in /in/eEDAg:6 Stack trace: #0 /in/eEDAg(6): in_array('{{stadt}}', true) #1 {main} thrown in /in/eEDAg on line 6
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
57.45 ms | 401 KiB | 8 Q