3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArr=array( array( 'question' => 'First Question', 'opt' => array('A','B','c','D'), 'ans' => '3' ), array( 'question' => 'Second Question', 'opt' => array('A','B','c','D'), 'ans' => '1' ) ); function display_array($arr){ if(gettype($arr) == 'array'){ foreach($arr as $v){ display_array($v); } }else{ echo $arr . PHP_EOL; // change to BR (I used PHP_EOL just for 3v4l.org) } } display_array($myArr);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.30.0130.00619.48
8.5.20.0080.00920.08
8.5.10.0100.01019.46
8.5.00.0130.01019.84
8.4.180.0080.01619.70
8.4.170.0110.01123.88
8.4.160.0120.01023.99
8.4.150.0090.00416.84
8.4.140.0140.01317.38
8.4.130.0140.00617.74
8.4.120.0090.01122.44
8.4.110.0150.00518.86
8.4.100.0060.00318.74
8.4.90.0110.00820.63
8.4.80.0080.00918.77
8.4.70.0040.00420.63
8.4.60.0120.00418.82
8.4.50.0120.00417.53
8.4.40.0050.00517.54
8.4.30.0140.00319.37
8.4.20.0130.01017.60
8.4.10.0070.01017.73
8.3.300.0100.01020.86
8.3.290.0070.01318.29
8.3.280.0150.00618.28
8.3.270.0130.00516.73
8.3.260.0110.00816.60
8.3.250.0100.00918.69
8.3.240.0100.00816.84
8.3.230.0130.00516.47
8.3.220.0040.00419.06
8.3.210.0140.00616.60
8.3.200.0020.00616.64
8.3.190.0110.00716.60
8.3.180.0110.00416.35
8.3.170.0180.00416.57
8.3.160.0140.00418.38
8.3.150.0070.01317.12
8.3.140.0040.00417.19
8.3.130.0080.00018.65
8.3.120.0050.00518.84
8.3.110.0040.00420.94
8.3.100.0000.00818.60
8.3.90.0110.00326.77
8.3.80.0030.00718.43
8.3.70.0160.00318.32
8.3.60.0120.00316.50
8.3.50.0210.00521.99
8.3.40.0100.01018.67
8.3.30.0070.01118.42
8.3.20.0040.00420.21
8.3.10.0050.00321.77
8.3.00.0030.00619.33
8.2.300.0110.01118.25
8.2.290.0110.00820.14
8.2.280.0100.00918.22
8.2.270.0070.00718.41
8.2.260.0040.01116.67
8.2.250.0070.00316.39
8.2.240.0060.00318.89
8.2.230.0000.00822.58
8.2.220.0060.00924.06
8.2.210.0030.00526.77
8.2.200.0090.00018.18
8.2.190.0110.00716.58
8.2.180.0100.01018.41
8.2.170.0070.00722.96
8.2.160.0100.01021.05
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0080.00022.20
8.2.120.0090.00026.35
8.2.110.0110.00021.13
8.2.100.0080.00418.03
8.2.90.0040.00419.34
8.2.80.0040.00418.04
8.2.70.0000.00817.93
8.2.60.0000.00817.93
8.2.50.0040.00418.10
8.2.40.0040.00420.44
8.2.30.0000.00719.22
8.2.20.0030.00618.09
8.2.10.0000.00718.11
8.2.00.0070.00018.33
8.1.340.0080.01321.55
8.1.330.0080.01116.17
8.1.320.0120.00716.13
8.1.310.0080.00015.89
8.1.300.0070.00717.66
8.1.290.0040.00430.84
8.1.280.0110.00325.92
8.1.270.0060.00320.71
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.20
8.1.230.0110.00019.09
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0050.00517.23
8.1.190.0090.00017.00
8.1.180.0080.00018.10
8.1.170.0050.00318.64
8.1.160.0070.00018.86
8.1.150.0000.00721.96
8.1.140.0000.00819.57
8.1.130.0070.00019.04
8.1.120.0080.00017.52
8.1.110.0030.00617.44
8.1.100.0000.00717.43
8.1.90.0000.00717.43
8.1.80.0000.00817.35
8.1.70.0030.00317.34
8.1.60.0040.00417.52
8.1.50.0040.00417.40
8.1.40.0040.00417.41
8.1.30.0030.00617.51
8.1.20.0000.00817.60
8.1.10.0000.00717.46
8.1.00.0000.00817.32
8.0.300.0000.00721.46
8.0.290.0080.00016.75
8.0.280.0030.00518.43
8.0.270.0070.00017.15
8.0.260.0000.00619.03
8.0.250.0030.00316.99
8.0.240.0040.00417.02
8.0.230.0040.00416.91
8.0.220.0030.00316.81
8.0.210.0000.00716.92
8.0.200.0030.00316.93
8.0.190.0040.00416.87
8.0.180.0000.00716.95
8.0.170.0070.00016.89
8.0.160.0030.00516.87
8.0.150.0000.00716.86
8.0.140.0040.00416.85
8.0.130.0050.00213.21
8.0.120.0000.00816.75
8.0.110.0000.00716.89
8.0.100.0040.00416.87
8.0.90.0000.00716.85
8.0.80.0040.01116.87
8.0.70.0050.00216.75
8.0.60.0040.00416.82
8.0.50.0000.00716.91
8.0.30.0090.00816.95
8.0.20.0070.01217.40
8.0.10.0000.00716.95
8.0.00.0060.01216.48
7.4.330.0040.00015.55
7.4.320.0040.00416.35
7.4.300.0000.00616.59
7.4.290.0030.00316.40
7.4.280.0030.00516.63
7.4.270.0070.00016.45
7.4.260.0020.00416.41
7.4.250.0040.00416.47
7.4.240.0000.00716.49
7.4.230.0070.00016.41
7.4.220.0170.00616.68
7.4.210.0090.00916.49
7.4.200.0000.00716.37
7.4.160.0130.00316.51
7.4.150.0090.01517.40
7.4.140.0160.01117.86
7.4.130.0110.00716.54
7.4.120.0140.00616.48
7.4.110.0120.00616.56
7.4.100.0130.00416.40
7.4.90.0120.01216.60
7.4.80.0070.01619.39
7.4.70.0060.01016.47
7.4.60.0040.01216.42
7.4.50.0030.00916.35
7.4.40.0100.00716.43
7.4.30.0090.00916.53
7.4.00.0100.00714.84
7.3.330.0000.00613.15
7.3.320.0050.00013.11
7.3.310.0000.00716.19
7.3.300.0000.00716.13
7.3.290.0090.00516.30
7.3.280.0100.00816.32
7.3.270.0130.01017.40
7.3.260.0120.00616.56
7.3.250.0080.01016.42
7.3.240.0100.00816.53
7.3.230.0100.01016.41
7.3.210.0030.01316.66
7.3.200.0060.00916.36
7.3.190.0170.00016.38
7.3.180.0080.00816.38
7.3.170.0120.01116.39
7.3.160.0110.00516.30
7.3.00.0040.01116.54
7.2.330.0080.00916.50
7.2.320.0060.01216.76
7.2.310.0140.00916.79
7.2.300.0070.01016.82
7.2.290.0140.00316.74
7.2.130.0090.00317.18
7.2.120.0000.01416.93
7.2.110.0000.01217.01
7.2.100.0000.01116.70
7.2.90.0040.00816.86
7.2.80.0050.00516.98
7.2.70.0100.00017.01
7.2.60.0100.00416.93
7.2.50.0070.00416.93
7.2.40.0000.00817.04
7.2.30.0100.00316.93
7.2.20.0000.01116.91
7.2.10.0070.00317.01
7.2.00.0070.00717.04
7.1.250.0110.00415.71
7.1.240.0040.01115.80
7.1.230.0030.00615.96
7.1.220.0030.00715.53
7.1.210.0100.00315.79
7.1.200.0070.00215.85
7.1.190.0060.00615.76
7.1.180.0040.00415.63
7.1.170.0000.01015.85
7.1.160.0000.00815.50
7.1.150.0040.00715.50
7.1.140.0000.01415.79
7.1.130.0000.01015.69
7.1.120.0030.00615.63
7.1.110.0030.00615.55
7.1.100.0040.00815.91
7.1.90.0060.01115.90
7.1.80.0030.01315.68
7.1.70.0000.01116.35
7.1.60.0070.00516.61
7.1.50.0110.00416.03
7.1.40.0150.01225.07
7.1.30.0160.00824.98
7.1.20.0180.00825.08
7.1.10.0040.00916.03
7.1.00.0100.00516.07
7.0.330.0000.00915.46
7.0.320.0030.00715.57
7.0.310.0050.00315.42
7.0.300.0040.00715.43
7.0.290.0070.00315.40
7.0.280.0070.00315.44
7.0.270.0060.00615.46
7.0.260.0120.00315.31
7.0.250.0040.01115.40
7.0.240.0000.01315.44
7.0.230.0060.00315.38
7.0.220.0100.00315.39
7.0.210.0030.01315.45
7.0.200.0070.00516.10
7.0.190.0000.00915.55
7.0.180.0020.01115.88
7.0.170.0030.00915.85
7.0.160.0050.00615.88
7.0.150.0040.00915.78
7.0.140.0050.00815.81
7.0.130.0000.01115.82
7.0.120.0030.01015.76
7.0.110.0030.01015.89
7.0.100.0020.01215.90
7.0.90.0000.01315.78
7.0.80.0050.00915.86
7.0.70.0020.00815.78
7.0.60.0050.00815.82
7.0.50.0070.00715.83
7.0.40.0050.00914.92
7.0.30.0030.01314.97
7.0.20.0030.00914.95
7.0.10.0050.00914.73
7.0.00.0030.01014.99
5.6.380.0060.00614.46

preferences:
62.34 ms | 1639 KiB | 5 Q