3v4l.org

run code in 300+ PHP versions simultaneously
<?php $User = array( 'Name' => "Hans-Peterµµ", 'Contacts' => array(1, 2, 3, 4, 5, 6, 7, 42), 'Seen' => array(array('UserID' => 2, 'Timestamp' => 5046), array('UserID' => 3, 'Timestamp' => 789456)), 'Active' => 1 ); $J = html_entity_decode(json_encode(array_utf8_encode($User))); die($J); function array_utf8_encode($Array) { foreach($Array as &$Val) { if(is_array($Val)) { $Val = array_utf8_encode($Val); } elseif(is_string($Val)) { $Val = mb_convert_encoding(htmlentities($Val), 'UTF-8'); } } return $Array; }

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.3.60.0070.01318.28
8.3.50.0130.00317.72
8.3.40.0090.00518.77
8.3.30.0040.01218.95
8.3.20.0080.00020.34
8.3.10.0060.00320.52
8.3.00.0080.00019.26
8.2.180.0080.00816.38
8.2.170.0110.00322.96
8.2.160.0030.01020.41
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0070.00021.10
8.2.110.0090.00020.39
8.2.100.0090.00317.97
8.2.90.0060.00319.22
8.2.80.0080.00017.97
8.2.70.0030.00517.63
8.2.60.0030.00618.02
8.2.50.0000.00818.07
8.2.40.0030.00618.09
8.2.30.0070.00019.50
8.2.20.0070.00317.80
8.2.10.0050.00318.00
8.2.00.0070.00017.80
8.1.280.0070.01425.92
8.1.270.0090.00022.14
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0040.00423.96
8.1.230.0080.00319.09
8.1.220.0000.00917.80
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0030.00618.66
8.1.160.0040.00421.99
8.1.150.0000.00818.86
8.1.140.0070.00417.42
8.1.130.0000.00717.81
8.1.120.0040.00417.54
8.1.110.0040.00417.57
8.1.100.0040.00317.52
8.1.90.0030.00317.43
8.1.80.0030.00317.50
8.1.70.0030.00317.47
8.1.60.0040.00417.64
8.1.50.0040.00417.62
8.1.40.0000.00717.55
8.1.30.0030.00617.74
8.1.20.0000.00717.55
8.1.10.0070.00017.57
8.1.00.0040.00417.44
8.0.300.0040.00418.77
8.0.290.0030.00616.75
8.0.280.0050.00318.38
8.0.270.0030.00317.26
8.0.260.0000.00617.29
8.0.250.0070.00016.99
8.0.240.0070.00017.01
8.0.230.0080.00016.97
8.0.220.0030.00317.03
8.0.210.0000.00717.09
8.0.200.0000.00817.07
8.0.190.0100.00017.09
8.0.180.0060.00317.04
8.0.170.0040.00417.00
8.0.160.0000.00717.12
8.0.150.0040.00416.93
8.0.140.0040.00416.86
8.0.130.0030.00313.45
8.0.120.0000.00816.89
8.0.110.0040.00416.98
8.0.100.0050.00316.91
8.0.90.0030.00316.96
8.0.80.0070.01517.06
8.0.70.0070.00017.02
8.0.60.0040.00417.09
8.0.50.0040.00417.05
8.0.30.0080.01017.09
8.0.20.0120.00717.40
8.0.10.0030.00516.91
8.0.00.0080.01016.75
7.4.330.0020.00215.11
7.4.320.0000.00716.68
7.4.300.0000.00616.46
7.4.290.0000.00716.65
7.4.280.0000.00816.66
7.4.270.0060.00316.59
7.4.260.0040.00416.64
7.4.250.0000.00816.44
7.4.240.0020.00516.62
7.4.230.0060.00016.46
7.4.220.0070.01116.78
7.4.210.0120.00316.72
7.4.200.0030.00316.36
7.4.160.0080.00816.61
7.4.150.0150.00417.40
7.4.140.0140.00517.86
7.4.130.0090.00716.64
7.4.120.0070.00916.51
7.4.110.0100.00716.47
7.4.100.0090.00916.60
7.4.90.0070.01016.65
7.4.80.0150.00319.39
7.4.70.0110.00916.52
7.4.60.0090.00616.71
7.4.50.0040.00416.57
7.4.40.0130.00916.47
7.4.30.0070.01016.70
7.4.00.0000.01414.85
7.3.330.0000.00513.39
7.3.320.0030.00313.39
7.3.310.0080.00016.25
7.3.300.0000.00716.44
7.3.290.0030.01016.39
7.3.280.0080.00816.43
7.3.270.0130.00917.40
7.3.260.0080.00816.70
7.3.250.0070.00916.59
7.3.240.0140.00816.34
7.3.230.0100.00716.39
7.3.210.0110.00616.38
7.3.200.0080.00919.39
7.3.190.0120.00416.31
7.3.180.0080.00816.48
7.3.170.0110.00616.29
7.3.160.0160.00616.45
7.3.120.0040.01114.72
7.3.110.0110.00415.06
7.3.100.0040.01115.05
7.3.90.0140.00015.09
7.3.80.0030.01314.83
7.3.70.0060.00614.72
7.3.60.0030.01314.68
7.3.50.0090.00314.78
7.3.40.0060.01214.89
7.3.30.0120.00414.50
7.3.20.0000.01416.82
7.3.10.0100.00716.44
7.3.00.0070.00416.81
7.2.330.0030.01316.66
7.2.320.0120.00616.74
7.2.310.0140.00416.84
7.2.300.0060.01016.74
7.2.290.0120.00616.48
7.2.240.0090.00914.96
7.2.230.0040.01114.91
7.2.220.0070.00715.11
7.2.210.0060.00915.09
7.2.200.0000.01515.14
7.2.190.0100.00715.25
7.2.180.0070.01014.89
7.2.170.0140.00015.16
7.2.160.0030.01414.96
7.2.150.0060.01017.00
7.2.140.0000.01217.01
7.2.130.0060.01016.93
7.2.120.0100.00716.77
7.2.110.0100.00017.02
7.2.100.0040.01116.88
7.2.90.0060.00917.01
7.2.80.0040.00817.01
7.2.70.0060.01117.00
7.2.60.0130.01116.71
7.2.50.0070.01016.93
7.2.40.0070.01016.95
7.2.30.0000.01316.83
7.2.20.0000.01716.96
7.2.10.0070.01016.91
7.2.00.0080.00618.19
7.1.330.0030.01015.70
7.1.320.0030.01315.79
7.1.310.0140.00315.57
7.1.300.0070.00715.86
7.1.290.0070.01015.64
7.1.280.0000.01515.79
7.1.270.0040.00815.64
7.1.260.0100.00715.79
7.1.250.0100.00315.63
7.1.200.0070.00715.64
7.1.100.0040.00718.02
7.1.70.0000.01017.09
7.1.60.0070.01719.61
7.1.50.0070.01117.14
7.1.00.0130.06722.54
7.0.200.0300.00014.82
7.0.140.0030.07321.92
7.0.90.0070.05319.87
7.0.80.0300.07319.88
7.0.70.0330.04719.95
7.0.60.0330.07319.94
7.0.50.0330.06020.26
7.0.40.0100.07020.14
7.0.30.0070.09020.08
7.0.20.0100.08720.14
7.0.10.0070.08720.14
7.0.00.0000.09020.08
5.6.280.0030.07321.16
5.6.240.0030.08020.72
5.6.230.0130.03320.57
5.6.220.0100.08020.62
5.6.210.0030.08320.75
5.6.200.0070.05020.96
5.6.190.0130.08021.02
5.6.180.0030.08721.07
5.6.170.0100.06721.14
5.6.160.0070.08721.05
5.6.150.0070.05721.14
5.6.140.0030.05021.04
5.6.130.0100.08021.02
5.6.120.0130.07720.94
5.6.110.0200.04721.05
5.6.100.0000.07721.07
5.6.90.0070.06721.15
5.6.80.0130.07720.41
5.6.70.0130.05020.55
5.6.60.0070.08320.54
5.6.50.0070.04320.39
5.6.40.0070.08020.46
5.6.30.0000.05320.49
5.6.20.0100.07020.52
5.6.10.0100.07320.31
5.6.00.0070.07320.30
5.5.380.0130.06320.36
5.5.370.0030.08320.41
5.5.360.0070.07720.44
5.5.350.0070.08020.43
5.5.340.0070.04320.92
5.5.330.0030.08320.84
5.5.320.0100.07320.84
5.5.310.0170.06720.83
5.5.300.0030.05320.78
5.5.290.0130.07720.73
5.5.280.0100.08320.80
5.5.270.0100.08320.84
5.5.260.0030.08720.72
5.5.250.0100.05320.61
5.5.240.0130.08320.18
5.5.230.0130.04720.15
5.5.220.0100.03720.25
5.5.210.0030.07320.06
5.5.200.0000.06020.16
5.5.190.0170.04320.08
5.5.180.0070.04720.17
5.5.160.0100.08020.15
5.5.150.0170.06720.23
5.5.140.0000.07719.96
5.5.130.0100.07720.23
5.5.120.0170.06020.26
5.5.110.0070.08020.12
5.5.100.0100.03720.06
5.5.90.0070.05720.15
5.5.80.0070.04320.15
5.5.70.0070.04719.96
5.5.60.0100.07020.14
5.5.50.0170.07020.16
5.5.40.0070.08019.96
5.5.30.0070.07720.05
5.5.20.0030.08320.08
5.5.10.0070.07720.13
5.5.00.0100.07320.10
5.4.450.0070.07719.38
5.4.440.0100.07019.58
5.4.430.0000.05019.20
5.4.420.0030.04019.49
5.4.410.0070.05019.33
5.4.400.0170.05019.13
5.4.390.0070.07719.18
5.4.380.0070.07718.95
5.4.370.0070.07719.21
5.4.360.0170.03318.88
5.4.350.0030.07319.23
5.4.340.0100.07719.05
5.4.320.0070.08019.14
5.4.310.0100.07018.95
5.4.300.0030.05319.03
5.4.290.0170.06019.17
5.4.280.0130.04719.12
5.4.270.0100.06719.20
5.4.260.0000.05019.23
5.4.250.0130.07019.13
5.4.240.0130.06318.89
5.4.230.0170.06719.20
5.4.220.0030.08318.89
5.4.210.0070.07019.22
5.4.200.0030.05718.94
5.4.190.0170.05719.13
5.4.180.0130.06319.15
5.4.170.0100.06318.84
5.4.160.0130.03019.14
5.4.150.0100.07719.12
5.4.140.0070.03716.37
5.4.130.0130.07016.38
5.4.120.0000.05316.36
5.4.110.0030.07316.29
5.4.100.0070.04316.35
5.4.90.0000.04016.43
5.4.80.0000.05016.50
5.4.70.0030.07016.37
5.4.60.0030.07316.36
5.4.50.0100.08016.34
5.4.40.0100.08316.41
5.4.30.0100.06716.36
5.4.20.0000.06716.40
5.4.10.0000.05016.49
5.4.00.0170.06315.73
5.3.290.0070.07714.78
5.3.280.0030.08014.61
5.3.270.0030.08314.73
5.3.260.0130.06714.69
5.3.250.0030.07714.68
5.3.240.0030.04314.73
5.3.230.0070.07314.55
5.3.220.0030.06714.63
5.3.210.0030.06314.61
5.3.200.0070.06714.50
5.3.190.0100.06014.50
5.3.180.0030.06314.59
5.3.170.0070.07014.70
5.3.160.0030.04714.52
5.3.150.0030.07314.69
5.3.140.0200.06014.67
5.3.130.0100.07014.67
5.3.120.0070.08314.54
5.3.110.0070.04314.56
5.3.100.0030.04714.00
5.3.90.0030.09014.03
5.3.80.0130.03314.07
5.3.70.0100.07314.00
5.3.60.0030.08013.92
5.3.50.0070.07314.04
5.3.40.0100.07013.98
5.3.30.0070.04313.80
5.3.20.0130.05713.62
5.3.10.0030.07313.56
5.3.00.0030.06013.70
5.2.170.0000.07011.16
5.2.160.0130.05311.18
5.2.150.0070.06011.05
5.2.140.0000.04311.22
5.2.130.0100.06011.18
5.2.120.0030.06011.22
5.2.110.0000.06711.21
5.2.100.0030.06011.16
5.2.90.0030.05311.21
5.2.80.0130.04011.09
5.2.70.0100.05711.21
5.2.60.0030.04311.04
5.2.50.0130.05011.01
5.2.40.0070.03311.10
5.2.30.0070.05011.05
5.2.20.0030.03310.91
5.2.10.0000.06710.88
5.2.00.0070.04010.58
5.1.60.0100.0479.84
5.1.50.0070.05010.09
5.1.40.0070.0409.99
5.1.30.0030.05310.47
5.1.20.0000.04010.52
5.1.10.0000.04010.13
5.1.00.0130.04710.14
5.0.50.0000.0278.43
5.0.40.0070.0438.49
5.0.30.0030.0608.26
5.0.20.0000.0308.04
5.0.10.0000.0478.26
5.0.00.0030.0278.25
4.4.90.0030.0337.36
4.4.80.0100.0277.36
4.4.70.0000.0177.36
4.4.60.0070.0137.36
4.4.50.0000.0207.36
4.4.40.0030.0407.36
4.4.30.0100.0307.36
4.4.20.0030.0307.36
4.4.10.0030.0337.36
4.4.00.0000.0277.36
4.3.110.0000.0277.36
4.3.100.0000.0377.36
4.3.90.0030.0337.36
4.3.80.0030.0537.36
4.3.70.0000.0377.36
4.3.60.0000.0337.36
4.3.50.0030.0277.36
4.3.40.0070.0377.36
4.3.30.0000.0177.36
4.3.20.0030.0337.36
4.3.10.0000.0377.36
4.3.00.0000.0137.36

preferences:
49.97 ms | 400 KiB | 5 Q