3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = json_encode(['end' => json_decode(null, true)]); class A implements \JsonSerializable { function jsonSerialize() { return ['end' => json_decode(null, true)]; } } $a = new A(); $res = json_encode($a); var_dump($result); var_dump($res);

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.0140.00016.88
8.3.50.0140.00521.21
8.3.40.0160.00318.76
8.3.30.0110.00418.89
8.3.20.0050.00318.60
8.3.10.0000.00821.86
8.3.00.0080.00017.80
8.2.180.0070.01118.42
8.2.170.0070.01122.96
8.2.160.0040.01119.33
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00421.00
8.2.120.0070.00026.35
8.2.110.0100.00021.00
8.2.100.0000.01218.03
8.2.90.0050.00319.35
8.2.80.0060.00317.97
8.2.70.0030.00617.63
8.2.60.0040.00418.16
8.2.50.0030.00518.10
8.2.40.0000.00822.20
8.2.30.0080.00019.31
8.2.20.0000.00717.70
8.2.10.0030.00518.00
8.2.00.0040.00417.99
8.1.280.0160.00625.92
8.1.270.0040.00423.83
8.1.260.0030.00728.09
8.1.250.0060.00328.09
8.1.240.0060.00623.90
8.1.230.0070.00420.90
8.1.220.0060.00317.74
8.1.210.0050.00518.77
8.1.200.0030.00617.34
8.1.190.0030.00617.36
8.1.180.0040.00418.10
8.1.170.0040.00418.82
8.1.160.0080.00018.97
8.1.150.0040.00418.89
8.1.140.0030.00319.57
8.1.130.0050.00217.65
8.1.120.0040.00417.27
8.1.110.0000.00817.36
8.1.100.0000.00717.48
8.1.90.0000.00717.45
8.1.80.0000.00717.36
8.1.70.0000.00717.40
8.1.60.0050.00217.61
8.1.50.0000.00717.52
8.1.40.0000.01017.36
8.1.30.0000.00817.51
8.1.20.0000.00717.51
8.1.10.0030.00617.52
8.1.00.0000.00717.33
8.0.300.0030.00618.77
8.0.290.0000.00716.63
8.0.280.0040.00418.44
8.0.270.0030.00317.16
8.0.260.0030.00317.12
8.0.250.0030.00316.93
8.0.240.0000.00716.88
8.0.230.0000.00716.86
8.0.220.0000.00716.76
8.0.210.0070.00016.77
8.0.200.0070.00417.01
8.0.190.0000.00816.85
8.0.180.0040.00416.88
8.0.170.0040.00416.95
8.0.160.0070.00016.82
8.0.150.0000.01016.70
8.0.140.0000.00716.88
8.0.130.0000.00613.39
8.0.120.0060.00316.75
8.0.110.0000.00716.93
8.0.100.0040.00416.76
8.0.90.0070.00016.73
8.0.80.0110.00416.89
8.0.70.0000.00816.80
8.0.60.0040.00416.83
8.0.50.0050.00216.89
8.0.30.0040.01117.22
8.0.20.0070.01217.40
8.0.10.0030.00416.84
8.0.00.0150.00316.69
7.4.330.0000.00515.08
7.4.320.0060.00016.49
7.4.300.0030.00316.49
7.4.290.0030.00316.50
7.4.280.0040.00416.48
7.4.270.0040.00416.43
7.4.260.0000.00716.63
7.4.250.0030.00316.47
7.4.240.0000.00716.57
7.4.230.0030.00316.57
7.4.220.0070.01116.54
7.4.210.0110.00716.56
7.4.200.0040.00216.58
7.4.160.0150.00016.61
7.4.150.0060.01617.40
7.4.140.0100.01017.86
7.4.130.0050.01616.59
7.4.120.0130.00616.48
7.4.110.0060.01216.68
7.4.100.0100.00716.36
7.4.90.0100.00716.50
7.4.80.0120.00919.39
7.4.70.0120.00316.51
7.4.60.0070.01016.48
7.4.50.0110.00316.39
7.4.40.0090.00616.40
7.4.30.0070.01016.58
7.4.00.0070.00915.05
7.3.330.0050.00013.15
7.3.320.0020.00213.15
7.3.310.0040.00416.32
7.3.300.0030.00316.27
7.3.290.0080.01116.31
7.3.280.0090.00916.34
7.3.270.0120.00617.40
7.3.260.0130.00316.20
7.3.250.0110.00816.29
7.3.240.0120.00916.37
7.3.230.0110.00516.47
7.3.210.0080.00816.33
7.3.200.0100.00716.51
7.3.190.0120.00316.57
7.3.180.0110.00616.46
7.3.170.0170.00016.23
7.3.160.0060.01016.34
7.3.120.0100.00814.83
7.3.110.0090.00814.69
7.3.100.0070.00714.53
7.3.90.0100.00814.66
7.3.80.0030.00614.78
7.3.70.0060.00314.69
7.3.60.0020.01214.80
7.3.50.0070.00514.81
7.3.40.0050.00814.73
7.3.30.0030.01114.67
7.3.20.0050.00916.60
7.3.10.0060.00716.52
7.3.00.0030.01016.37
7.2.330.0130.00316.29
7.2.320.0100.00716.77
7.2.310.0070.01016.52
7.2.300.0130.00416.52
7.2.290.0110.01116.54
7.2.250.0050.01314.85
7.2.240.0080.00914.97
7.2.230.0050.01215.15
7.2.220.0050.01214.75
7.2.210.0060.00814.96
7.2.200.0030.01015.03
7.2.190.0080.00614.83
7.2.180.0060.00714.84
7.2.170.0110.00514.81
7.2.60.0130.00316.50
7.2.50.0130.00017.00
7.1.330.0020.01415.60
7.1.320.0050.00415.86
7.1.310.0060.00815.50
7.1.300.0050.00915.63
7.1.290.0040.01015.70
7.1.280.0060.00615.61
7.1.270.0090.00615.52
7.1.260.0050.00515.80
7.1.200.0060.00615.50
7.1.70.0000.01717.10
7.1.60.0110.01419.25
7.1.50.0030.01716.92
7.1.00.0000.08022.28
7.0.200.0320.00614.71
7.0.90.0670.07319.91
7.0.80.0570.07319.90
7.0.70.0430.07019.94
7.0.60.0430.04019.88
7.0.50.0530.06720.25
7.0.40.0100.05019.98
7.0.30.0100.07020.13
7.0.20.0070.05320.03
7.0.10.0000.07320.07
7.0.00.0170.08320.10
5.6.280.0030.07321.13
5.6.240.0070.04020.64
5.6.230.0030.07320.59
5.6.220.0170.06320.62
5.6.210.0030.07020.65
5.6.200.0070.07720.95
5.6.190.0100.05321.03
5.6.180.0130.03321.09
5.6.170.0070.05021.06
5.6.160.0070.06321.02
5.6.150.0170.07321.11
5.6.140.0030.08021.05
5.6.130.0130.07021.04
5.6.120.0030.05021.11
5.6.110.0070.08021.07
5.6.100.0100.04021.04
5.6.90.0070.04720.94
5.6.80.0070.07720.49
5.6.70.0030.07020.39
5.6.60.0130.07020.47
5.6.50.0070.07720.50
5.6.40.0130.06720.42
5.6.30.0030.04720.41
5.6.20.0100.07720.54
5.6.10.0030.08320.44
5.6.00.0100.02720.38
5.5.380.0130.05720.45
5.5.370.0100.05320.45
5.5.360.0130.08020.56
5.5.350.0070.07720.42
5.5.340.0130.07320.92
5.5.330.0230.04020.91
5.5.320.0030.08320.85
5.5.310.0030.04320.64
5.5.300.0170.07020.83
5.5.290.0100.05320.89
5.5.280.0130.04020.79
5.5.270.0030.09320.85
5.5.260.0130.06720.75
5.5.250.0100.07720.68
5.5.240.0100.03020.19
5.5.230.0030.05320.12
5.5.220.0100.07020.14
5.5.210.0070.03320.22
5.5.200.0000.08020.15
5.5.190.0070.05320.07
5.5.180.0000.03720.21
5.5.160.0070.07320.15
5.5.150.0070.03320.26
5.5.140.0070.08320.21
5.5.130.0100.08020.16
5.5.120.0000.03720.27
5.5.110.0030.06320.26
5.5.100.0100.07320.05
5.5.90.0000.04020.06
5.5.80.0070.03020.15
5.5.70.0030.07019.94
5.5.60.0030.05320.14
5.5.50.0100.07320.14
5.5.40.0030.03719.93
5.5.30.0000.06020.04
5.5.20.0000.05319.95
5.5.10.0100.07720.07
5.5.00.0200.06720.13

preferences:
72.09 ms | 401 KiB | 5 Q