3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('a' => 12, 'b' => 'foo', 'caution' => array('blubb' => array('bar' => 'baz'))); $start = microtime(true); for ($i = 0; $i < 10000; $i++) { $obj1 = json_decode(json_encode($arr), false); } $end = microtime(true) - $start; echo "Run: " . sprintf('%.08f', $end) . PHP_EOL;

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.2.00.0070.02319.45
7.1.70.0030.02317.18
7.1.60.0100.04319.32
7.1.50.0070.04316.52
7.1.00.0000.05022.33
7.0.200.0100.01316.54
7.0.140.0000.10322.07
7.0.90.0600.07319.96
7.0.80.0670.08320.04
7.0.70.0630.09320.00
7.0.60.0500.09320.07
7.0.50.0570.08320.24
7.0.40.0130.10020.05
7.0.30.0030.07720.13
7.0.20.0130.09019.92
7.0.10.0070.10320.14
7.0.00.0100.10320.09
5.6.280.0100.10721.07
5.6.240.0100.10720.75
5.6.230.0100.07720.50
5.6.220.0100.09720.64
5.6.210.0030.07020.58
5.6.200.0070.10321.01
5.6.190.0200.09321.03
5.6.180.0070.12021.04
5.6.170.0100.06321.11
5.6.160.0070.10321.07
5.6.150.0030.07720.95
5.6.140.0130.08021.07
5.6.130.0130.10020.95
5.6.120.0070.10720.93
5.6.110.0030.07021.01
5.6.100.0070.07021.16
5.6.90.0100.10020.98
5.6.80.0130.10320.55
5.6.70.0030.11720.49
5.6.60.0100.08020.49
5.6.50.0070.10020.46
5.6.40.0030.06320.46
5.6.30.0130.06320.53
5.6.20.0000.06720.42
5.6.10.0070.11020.43
5.6.00.0170.09720.36
5.5.380.0170.10320.54
5.5.370.0100.10020.51
5.5.360.0100.11020.50
5.5.350.0070.10720.39
5.5.340.0100.11020.83
5.5.330.0030.12020.86
5.5.320.0200.08320.88
5.5.310.0030.11720.80
5.5.300.0070.09020.79
5.5.290.0000.12320.83
5.5.280.0030.09320.79
5.5.270.0030.08720.90
5.5.260.0100.10720.81
5.5.250.0070.11020.64
5.5.240.0070.11020.30
5.5.230.0130.11020.16
5.5.220.0130.09720.26
5.5.210.0130.09720.18
5.5.200.0070.06720.15
5.5.190.0170.10320.17
5.5.180.0070.10320.27
5.5.160.0130.10320.17
5.5.150.0030.11320.05
5.5.140.0130.10720.21
5.5.130.0030.11020.23
5.5.120.0070.09720.22
5.5.110.0070.06720.20
5.5.100.0030.12020.07
5.5.90.0100.10320.08
5.5.80.0070.09019.96
5.5.70.0100.09720.05
5.5.60.0130.10319.99
5.5.50.0070.11020.15
5.5.40.0070.08720.14
5.5.30.0100.10720.02
5.5.20.0100.10720.15
5.5.10.0030.09720.03
5.5.00.0070.10720.07
5.4.450.0030.12019.29
5.4.440.0100.05719.36
5.4.430.0070.10719.46
5.4.420.0000.12019.30
5.4.410.0030.09719.36
5.4.400.0070.08318.80
5.4.390.0070.11318.96
5.4.380.0000.11019.07
5.4.370.0130.10718.96
5.4.360.0030.06319.10
5.4.350.0070.09319.03
5.4.340.0030.07019.04
5.4.320.0070.08718.81
5.4.310.0070.10019.11
5.4.300.0100.09019.04
5.4.290.0070.11018.89
5.4.280.0100.09319.12
5.4.270.0070.11019.14
5.4.260.0070.11719.11
5.4.250.0130.09018.89
5.4.240.0000.10319.14
5.4.230.0130.09718.96
5.4.220.0030.12019.22
5.4.210.0100.10019.09
5.4.200.0030.10719.22
5.4.190.0130.09319.03
5.4.180.0070.11319.04
5.4.170.0100.10019.02
5.4.160.0100.10719.05
5.4.150.0100.10319.04
5.4.140.0100.09016.32
5.4.130.0070.09716.27
5.4.120.0130.07716.23
5.4.110.0030.05716.32
5.4.100.0070.10016.42
5.4.90.0070.10016.21
5.4.80.0170.08716.33
5.4.70.0100.09316.34
5.4.60.0100.07316.34
5.4.50.0030.09716.35
5.4.40.0030.09716.28
5.4.30.0100.10016.27
5.4.20.0070.11016.18
5.4.10.0070.09716.22
5.4.00.0100.09315.69
5.3.290.0100.10014.63
5.3.280.0070.10714.61
5.3.270.0100.09714.50
5.3.260.0070.10314.47
5.3.250.0030.10314.43
5.3.240.0030.10314.59
5.3.230.0070.10714.55
5.3.220.0100.09714.56
5.3.210.0130.06714.48
5.3.200.0070.09314.43
5.3.190.0070.08714.54
5.3.180.0070.10314.43
5.3.170.0000.11014.58
5.3.160.0070.10314.58
5.3.150.0030.09314.57
5.3.140.0070.11014.42
5.3.130.0070.06014.39
5.3.120.0100.06714.41
5.3.110.0100.09714.55
5.3.100.0200.09313.99
5.3.90.0100.11013.89
5.3.80.0030.10014.02
5.3.70.0030.10713.98
5.3.60.0030.10313.87
5.3.50.0070.10313.72
5.3.40.0070.09013.89
5.3.30.0130.09313.89
5.3.20.0030.10013.63
5.3.10.0030.10013.62
5.3.00.0100.08313.64
5.2.170.0030.09011.21
5.2.160.0030.10011.14
5.2.150.0100.09311.17
5.2.140.0070.10010.93
5.2.130.0170.08011.09
5.2.120.0170.09011.09
5.2.110.0100.09011.09
5.2.100.0030.09711.15
5.2.90.0100.09310.89
5.2.80.0130.09011.14
5.2.70.0030.09011.09
5.2.60.0000.09310.88
5.2.50.0000.10011.08
5.2.40.0070.09010.81
5.2.30.0100.09011.05
5.2.20.0000.11010.95
5.2.10.0130.05710.75
5.2.00.0030.10010.72
5.1.60.0070.03310.04
5.1.50.0030.0479.97
5.1.40.0000.0579.81
5.1.30.0000.05010.37
5.1.20.0070.03310.28
5.1.10.0030.04310.10
5.1.00.0030.05010.11
5.0.50.0100.0378.57
5.0.40.0100.0338.39
5.0.30.0070.0578.30
5.0.20.0070.0378.30
5.0.10.0000.0408.16
5.0.00.0030.0338.14
4.4.90.0000.0337.09
4.4.80.0000.0377.09
4.4.70.0000.0407.09
4.4.60.0000.0337.09
4.4.50.0030.0207.09
4.4.40.0030.0437.09
4.4.30.0000.0237.09
4.4.20.0030.0277.09
4.4.10.0030.0307.09
4.4.00.0030.0437.09
4.3.110.0000.0337.09
4.3.100.0000.0377.09
4.3.90.0000.0407.09
4.3.80.0000.0377.09
4.3.70.0000.0377.09
4.3.60.0000.0377.09
4.3.50.0070.0307.09
4.3.40.0000.0377.09
4.3.30.0030.0377.09
4.3.20.0070.0307.09
4.3.10.0030.0307.09
4.3.00.0070.0277.09

preferences:
30.71 ms | 401 KiB | 5 Q