3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array("a_b_c"); $array2 = array("a","c","d","e"); $promotion = explode($array1, "_"); foreach($promotion as $promo) { if(in_array($promo,$array2)) { print_r($promo); } }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: explode(): Argument #1 ($separator) must be of type string, array given in /in/jGN5Q:8 Stack trace: #0 /in/jGN5Q(8): explode(Array, '_') #1 {main} thrown in /in/jGN5Q on line 8
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:
46.74 ms | 401 KiB | 8 Q