3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test implements JsonSerializable { private $name = 'Mike Jones'; public function jsonSerialize() { return [ 'name' => $this->name, 'fooo' => ['year' => 2003, 'type' => 'single'] ]; } } var_dump(json_encode(new Test()));

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.0050.01416.75
8.3.50.0030.01318.42
8.3.40.0110.00718.97
8.3.30.0140.00018.63
8.3.20.0070.00020.29
8.3.10.0060.00320.53
8.3.00.0070.00023.54
8.2.180.0030.01016.50
8.2.170.0070.01422.96
8.2.160.0100.00322.20
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0080.00020.85
8.2.120.0080.00026.35
8.2.110.0090.00022.07
8.2.100.0060.00617.91
8.2.90.0060.00319.27
8.2.80.0000.00917.97
8.2.70.0040.00417.50
8.2.60.0040.00417.93
8.2.50.0050.00318.09
8.2.40.0060.00320.53
8.2.30.0030.00319.38
8.2.20.0040.00417.68
8.2.10.0000.00818.16
8.2.00.0000.00818.17
8.1.280.0070.01425.92
8.1.270.0120.00622.14
8.1.260.0040.00428.09
8.1.250.0050.00328.09
8.1.240.0060.00319.26
8.1.230.0050.00517.58
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0000.01117.23
8.1.190.0000.01017.25
8.1.180.0040.00418.10
8.1.170.0040.00418.59
8.1.160.0050.00220.76
8.1.150.0050.00218.86
8.1.140.0040.00419.59
8.1.130.0040.00417.67
8.1.120.0000.00817.53
8.1.110.0000.00717.49
8.1.100.0070.00017.43
8.1.90.0000.00717.50
8.1.80.0070.00017.42
8.1.70.0000.00717.47
8.1.60.0040.00417.56
8.1.50.0000.00817.36
8.1.40.0040.00417.46
8.1.30.0040.00417.46
8.1.20.0040.00417.48
8.1.10.0030.00617.43
8.1.00.0000.00717.27
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00718.32
8.0.270.0000.00717.31
8.0.260.0000.00717.27
8.0.250.0000.00716.96
8.0.240.0070.00016.91
8.0.230.0000.00716.89
8.0.220.0000.00916.87
8.0.210.0050.00216.71
8.0.200.0080.00016.85
8.0.190.0040.00416.93
8.0.180.0030.00316.95
8.0.170.0030.00516.76
8.0.160.0040.00416.86
8.0.150.0030.00316.90
8.0.140.0080.00416.80
8.0.130.0030.00313.32
8.0.120.0000.00816.80
8.0.110.0000.00716.82
8.0.100.0070.00016.81
8.0.90.0030.00516.65
8.0.80.0130.00616.78
8.0.70.0050.00316.89
8.0.60.0020.00516.88
8.0.50.0080.00016.88
8.0.30.0110.00517.08
8.0.20.0100.00817.40
8.0.10.0070.00016.92
8.0.00.0140.00316.72
7.4.330.0050.00016.71
7.4.320.0000.00616.38
7.4.300.0000.00816.54
7.4.290.0030.00516.46
7.4.280.0040.00416.52
7.4.270.0050.00516.57
7.4.260.0000.00616.44
7.4.250.0070.00016.43
7.4.240.0030.00316.36
7.4.230.0060.00016.32
7.4.220.0100.00716.57
7.4.210.0110.00516.58
7.4.200.0040.00416.34
7.4.160.0000.01516.52
7.4.150.0130.00717.40
7.4.140.0110.01117.86
7.4.130.0150.00316.46
7.4.120.0140.00316.46
7.4.110.0040.01416.78
7.4.100.0080.00816.41
7.4.90.0110.00716.32
7.4.80.0110.00719.39
7.4.70.0090.00616.56
7.4.60.0110.00716.45
7.4.50.0090.00616.57
7.4.40.0070.01016.39
7.4.30.0170.00416.47
7.4.00.0040.00914.74
7.3.330.0060.00013.13
7.3.320.0030.00213.35
7.3.310.0000.00616.27
7.3.300.0000.00716.16
7.3.290.0030.00316.12
7.3.280.0080.01016.27
7.3.270.0030.01317.40
7.3.260.0080.00816.45
7.3.250.0100.01016.51
7.3.240.0040.01316.58
7.3.230.0060.01216.39
7.3.210.0090.01516.30
7.3.200.0080.01419.39
7.3.190.0060.01016.57
7.3.180.0070.01316.20
7.3.170.0090.00916.24
7.3.160.0160.00616.32
7.2.330.0060.01116.55
7.2.320.0120.00916.70
7.2.310.0210.00316.71
7.2.300.0080.00816.54
7.2.290.0040.01216.45
7.2.60.0100.00616.68
7.2.00.0110.00319.12
7.1.200.0070.00715.57
7.1.100.0030.00617.91
7.1.70.0070.00717.00
7.1.60.0090.01519.40
7.1.50.0100.01016.91
7.1.00.0070.07322.33
7.0.200.0480.00314.26
7.0.90.0000.04320.01
7.0.80.0070.05319.86
7.0.70.0300.08019.91
7.0.60.0270.05019.81
7.0.50.0100.08020.31
7.0.40.0070.04720.05
7.0.30.0070.09020.04
7.0.20.0130.03720.07
7.0.10.0030.08720.04
7.0.00.0130.07320.14
5.6.280.0000.05020.86
5.6.240.0030.08720.64
5.6.230.0030.07720.71
5.6.220.0100.04320.61
5.6.210.0100.07720.64
5.6.200.0130.08021.12
5.6.190.0030.04321.16
5.6.180.0130.04321.05
5.6.170.0070.06321.02
5.6.160.0100.04720.95
5.6.150.0000.07721.08
5.6.140.0170.04721.03
5.6.130.0030.08721.03
5.6.120.0070.06021.02
5.6.110.0100.07721.09
5.6.100.0130.08020.95
5.6.90.0030.05020.92
5.6.80.0030.08020.34
5.6.70.0000.08720.39
5.6.60.0070.07320.42
5.6.50.0070.08020.35
5.6.40.0200.07320.38
5.6.30.0070.08320.38
5.6.20.0100.07020.43
5.6.10.0230.06720.38
5.6.00.0130.07720.39
5.5.380.0100.03720.52
5.5.370.0100.06020.42
5.5.360.0030.09020.34
5.5.350.0070.08020.37
5.5.340.0170.08020.78
5.5.330.0070.08020.87
5.5.320.0070.07320.73
5.5.310.0100.07320.77
5.5.300.0000.04720.91
5.5.290.0030.05020.73
5.5.280.0070.05720.92
5.5.270.0100.04320.87
5.5.260.0070.08020.82
5.5.250.0100.07720.70
5.5.240.0130.04020.18
5.5.230.0130.06720.20
5.5.220.0230.06320.23
5.5.210.0030.08320.30
5.5.200.0100.07320.00
5.5.190.0030.07020.28
5.5.180.0070.04720.21
5.5.160.0100.07319.99
5.5.150.0030.07020.26
5.5.140.0130.04020.11
5.5.130.0130.05320.27
5.5.120.0200.05320.25
5.5.110.0170.06320.26
5.5.100.0170.03720.07
5.5.90.0200.05320.07
5.5.80.0030.07720.13
5.5.70.0030.07719.97
5.5.60.0130.03720.15
5.5.50.0070.07720.14
5.5.40.0100.07320.10
5.5.30.0030.09020.08
5.5.20.0000.08720.08
5.5.10.0030.08320.11
5.5.00.0000.08319.95

preferences:
57.01 ms | 401 KiB | 5 Q