3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'maríaé'; function substr_count_array( $haystack, $needle ) { foreach ($needle as $substring) { $count[$substring] += substr_count( $haystack, $substring); } return $count; } print_r(substr_count_array($str, array("á","é","í","ó")));
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $count in /in/S7hD3 on line 5 Warning: Undefined array key "á" in /in/S7hD3 on line 5 Warning: Undefined array key "é" in /in/S7hD3 on line 5 Warning: Undefined array key "í" in /in/S7hD3 on line 5 Warning: Undefined array key "ó" in /in/S7hD3 on line 5 Array ( [á] => 0 [é] => 1 [í] => 1 [ó] => 0 )

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:
96.31 ms | 401 KiB | 8 Q