3v4l.org

run code in 300+ PHP versions simultaneously
<?php $biger_array = array( $a = array("DHL","ACS", "UPS"), $b = array("PayPal", "BrainTree", "UnionPay") ); $sizeof_biger_array = sizeof($biger_array); $array_with_size_of_smaller_arrays = array(); for ($x=0; $x<$sizeof_biger_array; $x++){ //$array_with_size_of_smaller_arrays[] =; $array_with_size_of_smaller_arrays[] = sizeof($biger_array[$x]); } function forLoopDynamic(array $array, array $number_of_vars_in_every_array) { //print 'Inside `aMemberFunc()`'; $sizeOfTheBigerArray = sizeof($number_of_vars_in_every_array); for ($i=0; $i<$sizeOfTheBigerArray; $i++){ echo $number_of_vars_in_every_array[$i]; //for ($x=0; $x<($number_of_vars_in_every_array[$i]); $x++){ //echo $array[$x]; //} } } forLoopDynamic($a, $array_with_size_of_smaller_arrays); //echo $biger_array[0][0]; //echo $biger_array[1][0]; echo sizeof($array_with_size_of_smaller_arrays); //print_R($array_with_size_of_smaller_arrays);
Output for git.master, git.master_jit, rfc.property-hooks
332

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