3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test_data1 = array('one','two','three'); // all is ok $test_data2 = array(array('one','two','three')); // windows error: // #The instruction at '<address>' referenced memory at '<address>'. // #The memory could not be read. // #Click OK to terminate the program. // No error shows up in console, sometimes script stops without error but sometimes executes like nothing is happening. $test_data3 = array(array('one','two','three'),array('four','five','six')); // error in PHP console: // Fatal error: Call to a member function show_message() on a non-object in c:\scripts\found-error.php on line xx // values one two three are displayed, four five and six are ommitted. class myClass { function iterate_multidim_array($array) { array_walk_recursive($array,function(&$val,$key,&$obj) { $obj->show_message($val); },$this); } function show_message($msg) { echo $msg."\n"; } } echo phpversion()."\n\n"; $myInstance = new MyClass(); $myInstance-> iterate_multidim_array($test_data3); ?>

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)
7.4.10.0060.01314.81
7.4.00.0040.01414.78
7.3.130.0100.01014.97
7.3.120.0050.01214.79
7.3.110.0120.00514.85
7.3.100.0030.01414.71
7.3.90.0050.01214.62
7.3.80.0070.00614.88
7.3.70.0060.00414.71
7.3.60.0090.00814.79
7.3.50.0070.00614.60
7.3.40.0040.00914.61
7.3.30.0110.00314.76
7.3.20.0040.01016.47
7.3.10.0100.00216.58
7.3.00.0070.00816.52
7.2.260.0070.01214.83
7.2.250.0060.01214.99
7.2.240.0090.00714.89
7.2.230.0060.01014.86
7.2.220.0100.00714.99
7.2.210.0040.00815.09
7.2.200.0050.01115.00
7.2.190.0110.00714.88
7.2.180.0070.00915.06
7.2.170.0090.00615.01
7.2.160.0090.00615.06
7.2.150.0070.00916.95
7.2.140.0090.00316.97
7.2.130.0070.00516.88
7.2.120.0070.00816.70
7.2.110.0060.00816.81
7.2.100.0050.01216.91
7.2.90.0100.00616.95
7.2.80.0120.00816.77
7.2.70.0100.01216.82
7.2.60.0110.00716.82
7.2.50.0110.00516.90
7.2.40.0100.00516.92
7.2.30.0070.00816.88
7.2.20.0060.00916.79
7.2.10.0040.00916.81
7.2.00.0060.00717.38
7.1.330.0050.00815.55
7.1.320.0100.00715.52
7.1.310.0070.00715.66
7.1.300.0060.00715.81
7.1.290.0070.00515.48
7.1.280.0070.00715.59
7.1.270.0030.00815.84
7.1.260.0050.00815.79
7.1.250.0060.00815.73
7.1.240.0060.01015.71
7.1.230.0080.00715.82
7.1.220.0040.00815.69
7.1.210.0030.01015.61
7.1.200.0080.00915.76
7.1.190.0080.00815.81
7.1.180.0040.01015.77
7.1.170.0090.00415.78
7.1.160.0050.00915.76
7.1.150.0120.00315.67
7.1.140.0030.01215.42
7.1.130.0060.00815.77
7.1.120.0050.01015.72
7.1.110.0100.00715.79
7.1.100.0060.00916.28
7.1.90.0060.00915.60
7.1.80.0040.01015.75
7.1.70.0070.00816.13
7.1.60.0080.00916.50
7.1.50.0070.01015.95
7.1.40.0070.00715.58
7.1.30.0090.00515.72
7.1.20.0090.00515.58
7.1.10.0050.00815.63
7.1.00.0070.02017.46
7.0.330.0050.00715.27
7.0.320.0040.01215.33
7.0.310.0030.00815.27
7.0.300.0050.00715.39
7.0.290.0070.00715.36
7.0.280.0090.00415.30
7.0.270.0060.00615.34
7.0.260.0080.00615.25
7.0.250.0050.00815.36
7.0.240.0030.01115.39
7.0.230.0050.00515.53
7.0.220.0070.00715.48
7.0.210.0060.00915.41
7.0.200.0130.00615.24
7.0.190.0020.01215.23
7.0.180.0070.00715.47
7.0.170.0060.00815.47
7.0.160.0080.00615.51
7.0.150.0060.00915.41
7.0.140.0060.02417.02
7.0.130.0080.00815.44
7.0.120.0120.01816.99
7.0.110.0080.00715.18
7.0.100.0070.00415.44
7.0.90.0040.00815.33
7.0.80.0050.00915.37
7.0.70.0090.00715.33
7.0.60.0080.02616.53
7.0.50.0100.02416.05
7.0.40.0050.02114.97
7.0.30.0120.01915.10
7.0.20.0150.01715.06
7.0.10.0040.02814.98
7.0.00.0050.02615.01
5.6.400.0050.00914.34
5.6.390.0090.00714.11
5.6.380.0040.01114.42
5.6.370.0050.00914.10
5.6.360.0030.01214.39
5.6.350.0090.00414.38
5.6.340.0080.00914.48
5.6.330.0070.00614.36
5.6.320.0070.00914.23
5.6.310.0050.01014.27
5.6.300.0050.01014.48
5.6.290.0050.00614.23
5.6.280.0050.02616.17
5.6.270.0110.00614.51
5.6.260.0070.01014.65
5.6.250.0060.00914.45
5.6.240.0060.00714.33
5.6.230.0050.00914.29
5.6.220.0080.00614.33
5.6.210.0030.02515.86
5.6.200.0030.02915.31
5.6.190.0060.01715.83
5.6.180.0130.01515.85
5.6.170.0120.01915.73
5.6.160.0070.02515.85
5.6.150.0070.02515.24
5.6.140.0070.02215.37
5.6.130.0050.01715.20
5.6.120.0050.02815.99
5.6.110.0100.02415.89
5.6.100.0070.02415.86
5.6.90.0060.01815.82
5.6.80.0090.02415.67
5.6.70.0070.00614.15
5.6.60.0040.00914.10
5.6.50.0070.01014.19
5.6.40.0060.01014.13
5.6.30.0100.00514.39
5.6.20.0060.00814.24
5.6.10.0050.00714.16
5.6.00.0070.00814.04
5.5.380.0050.00913.27
5.5.370.0050.00813.17
5.5.360.0080.00513.13
5.5.350.0110.02615.16
5.5.340.0070.02514.42
5.5.330.0120.01915.05
5.5.320.0110.01614.98
5.5.310.0090.02015.05
5.5.300.0070.02614.37
5.5.290.0110.02114.48
5.5.280.0090.02415.10
5.5.270.0090.02115.01
5.5.260.0080.02715.23
5.5.250.0140.01915.15
5.5.240.0080.01914.90
5.5.230.0080.00513.08
5.5.220.0070.00913.22
5.5.210.0080.00513.26
5.5.200.0070.00713.16
5.5.190.0100.00413.06
5.5.180.0030.01013.24
5.5.170.0070.00813.04
5.5.160.0050.01013.21
5.5.150.0120.00613.01
5.5.140.0070.00713.16
5.5.130.0070.00613.13
5.5.120.0080.00813.27
5.5.110.0040.00913.17
5.5.100.0090.00413.31
5.5.90.0050.00913.16
5.5.80.0080.00513.10
5.5.70.0070.00613.20
5.5.60.0060.01013.33
5.5.50.0080.00713.08
5.5.40.0100.00413.13
5.5.30.0090.00613.17
5.5.20.0090.00613.08
5.5.10.0100.00513.19
5.5.00.0070.00713.31
5.4.450.0080.02413.38
5.4.440.0060.02513.35
5.4.430.0040.02713.26
5.4.420.0060.01613.45
5.4.410.0070.02013.26
5.4.400.0050.01513.24
5.4.390.0050.01613.12
5.4.380.0040.02313.23
5.4.370.0070.02113.12
5.4.360.0060.01413.30
5.4.350.0020.01913.19
5.4.340.0040.01713.20
5.4.330.0050.00611.27
5.4.320.0050.02613.10
5.4.310.0040.01713.32
5.4.300.0070.01613.13
5.4.290.0040.01413.19
5.4.280.0050.02213.21
5.4.270.0050.01613.17
5.4.260.0030.01913.13
5.4.250.0040.02513.28
5.4.240.0040.02413.25
5.4.230.0030.02413.20
5.4.220.0100.02113.15
5.4.210.0070.02213.25
5.4.200.0040.02313.24
5.4.190.0030.02313.31
5.4.180.0060.01613.20
5.4.170.0070.01913.11
5.4.160.0040.01913.21
5.4.150.0040.01613.30
5.4.140.0040.01312.59
5.4.130.0070.01112.53
5.4.120.0040.01412.50
5.4.110.0030.01612.70
5.4.100.0050.01312.51
5.4.90.0010.01412.49
5.4.80.0030.01412.50
5.4.70.0030.01512.61
5.4.60.0040.01212.44
5.4.50.0040.01312.56
5.4.40.0040.01212.61
5.4.30.0040.01512.56
5.4.20.0040.01512.62
5.4.10.0090.00912.56
5.4.00.0040.01312.40
5.3.290.0060.02412.09
5.3.280.0060.01512.01
5.3.270.0020.02612.02
5.3.260.0040.01511.97
5.3.250.0040.01311.95
5.3.240.0080.01011.90
5.3.230.0020.01412.00
5.3.220.0060.01511.90
5.3.210.0020.01711.95
5.3.200.0070.01311.97
5.3.190.0040.01411.99
5.3.180.0020.01712.05
5.3.170.0050.01512.00
5.3.160.0020.01611.98
5.3.150.0070.01711.96
5.3.140.0080.01212.03
5.3.130.0030.01612.00
5.3.120.0020.01711.99
5.3.110.0020.01611.98
5.3.100.0060.01311.88
5.3.90.0040.01611.90
5.3.80.0030.01511.78
5.3.70.0070.01011.78
5.3.60.0060.01111.85
5.3.50.0020.01611.87
5.3.40.0060.01311.78
5.3.30.0050.01211.81
5.3.20.0050.01411.80
5.3.10.0050.01211.76
5.3.00.0020.01311.68
5.2.170.0000.02010.26
5.2.160.0070.01310.27
5.2.150.0050.01510.32
5.2.140.0050.01810.28
5.2.130.0050.01610.21
5.2.120.0030.01910.29
5.2.110.0020.01910.28
5.2.100.0030.01710.34
5.2.90.0030.01710.34
5.2.80.0000.01910.33
5.2.70.0000.02210.33
5.2.60.0020.01810.27
5.2.50.0030.01710.24
5.2.40.0070.01210.17
5.2.30.0040.01710.27
5.2.20.0030.01710.20
5.2.10.0060.03010.17
5.2.00.0030.02010.14
5.1.60.0030.0169.70
5.1.50.0030.0179.66
5.1.40.0020.0189.72
5.1.30.0060.0279.88
5.1.20.0050.0309.89
5.1.10.0050.0279.72
5.1.00.0030.0289.77
5.0.50.0000.0289.00
5.0.40.0000.0138.87
5.0.30.0070.0308.80
5.0.20.0050.0208.84
5.0.10.0070.0238.87
5.0.00.0030.0308.79
4.4.90.0050.0068.61
4.4.80.0020.0108.61
4.4.70.0020.0128.61
4.4.60.0050.0088.61
4.4.50.0050.0088.61
4.4.40.0000.0148.61
4.4.30.0060.0168.61
4.4.20.0010.0208.61
4.4.10.0000.0178.61
4.4.00.0020.0258.61
4.3.110.0040.0098.61
4.3.100.0020.0208.61
4.3.90.0020.0188.61
4.3.80.0030.0178.61
4.3.70.0020.0178.61
4.3.60.0020.0128.61
4.3.50.0010.0118.61
4.3.40.0030.0198.61
4.3.30.0040.0158.61
4.3.20.0010.0168.61
4.3.10.0060.0138.61
4.3.00.0040.0158.61

preferences:
28.29 ms | 401 KiB | 5 Q