3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements Serializable { public function jsonSerialize() { return [ 'title' => $this->title, 'parent' => $this->parent, ]; } } $f1 = new Foo(); $f1->title = 'Foo'; $f2 = new Foo(); $f2->title = 'Bar'; $f2->parent = $f1; echo json_encode($f2);

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.70.0080.00816.75
8.3.60.0040.01116.63
8.3.50.0140.00721.99
8.3.40.0120.00318.67
8.3.30.0110.00318.68
8.3.20.0040.00420.20
8.3.10.0040.00423.51
8.3.00.0080.00019.13
8.2.180.0110.00416.35
8.2.170.0090.00622.96
8.2.160.0070.00720.27
8.2.150.0050.00224.18
8.2.140.0040.00424.66
8.2.130.0060.00317.63
8.2.120.0060.00326.35
8.2.110.0030.00621.07
8.2.100.0030.00917.78
8.2.90.0040.00419.08
8.2.80.0080.00017.97
8.2.70.0050.00317.50
8.2.60.0070.00017.90
8.2.50.0040.00418.10
8.2.40.0060.00319.47
8.2.30.0000.00720.65
8.2.20.0000.01017.69
8.2.10.0040.00418.00
8.2.00.0040.00417.98
8.1.280.0030.01425.92
8.1.270.0100.00023.97
8.1.260.0050.00228.09
8.1.250.0040.00428.09
8.1.240.0070.00322.60
8.1.230.0080.00419.54
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00617.13
8.1.190.0000.00817.22
8.1.180.0030.00618.10
8.1.170.0040.00418.62
8.1.160.0060.00321.93
8.1.150.0000.00718.77
8.1.140.0030.00519.44
8.1.130.0070.00017.70
8.1.120.0000.00817.40
8.1.110.0050.00317.45
8.1.100.0020.00517.42
8.1.90.0050.00517.45
8.1.80.0040.00417.30
8.1.70.0000.00717.29
8.1.60.0040.00417.59
8.1.50.0030.00517.48
8.1.40.0040.00417.43
8.1.30.0000.00817.64
8.1.20.0040.00417.56
8.1.10.0040.00417.41
8.1.00.0040.00417.22
8.0.300.0090.00018.77
8.0.290.0000.01016.75
8.0.280.0070.00018.35
8.0.270.0000.00717.21
8.0.260.0090.00017.17
8.0.250.0030.00316.95
8.0.240.0090.00017.01
8.0.230.0030.00316.82
8.0.220.0070.00016.89
8.0.210.0080.00016.92
8.0.200.0030.00316.97
8.0.190.0040.00416.99
8.0.180.0040.00416.83
8.0.170.0060.00316.89
8.0.160.0000.00716.89
8.0.150.0030.00316.91
8.0.140.0050.00216.85
8.0.130.0050.00013.29
8.0.120.0030.00516.76
8.0.110.0040.00416.81
8.0.100.0000.00816.78
8.0.90.0030.00316.72
8.0.80.0060.00916.87
8.0.70.0070.00016.76
8.0.60.0000.00716.92
8.0.50.0000.00816.88
8.0.30.0130.00516.98
8.0.20.0140.00817.40
8.0.10.0040.00416.88
8.0.00.0070.01116.79
7.4.330.0020.00216.66
7.4.320.0060.00016.46
7.4.300.0000.00616.43
7.4.290.0000.00716.52
7.4.280.0080.00016.46
7.4.270.0030.00316.46
7.4.260.0000.00716.50
7.4.250.0070.00016.50
7.4.240.0060.00216.54
7.4.230.0070.00016.45
7.4.220.0090.01516.40
7.4.210.0060.00916.59
7.4.200.0000.00716.64
7.4.160.0150.00816.63
7.4.150.0100.00717.40
7.4.140.0100.01117.86
7.4.130.0130.00516.43
7.4.120.0110.00616.51
7.4.110.0060.01516.52
7.4.100.0120.00616.44
7.4.90.0080.00816.60
7.4.80.0150.00619.39
7.4.70.0140.00316.39
7.4.60.0080.00816.37
7.4.50.0070.01116.47
7.4.40.0080.01116.37
7.4.30.0140.00316.43
7.4.00.0030.00914.84
7.3.330.0000.00613.10
7.3.320.0000.00713.25
7.3.310.0000.00716.09
7.3.300.0030.00316.25
7.3.290.0100.00516.22
7.3.280.0110.01016.22
7.3.270.0140.00617.40
7.3.260.0130.00316.26
7.3.250.0120.00516.36
7.3.240.0100.00716.41
7.3.230.0140.00316.46
7.3.210.0060.01216.43
7.3.200.0160.00016.15
7.3.190.0070.01316.38
7.3.180.0130.00716.29
7.3.170.0100.01316.30
7.3.160.0060.00916.41
7.2.330.0070.01416.34
7.2.320.0160.00316.61
7.2.310.0110.01116.33
7.2.300.0090.00916.65
7.2.290.0100.00716.63
7.2.60.0070.00716.44
7.2.00.0080.00419.31
7.1.200.0040.00715.36
7.1.100.0000.01018.04
7.1.70.0000.00816.96
7.1.60.0170.00719.12
7.1.50.0000.02116.80
7.1.00.0000.07722.51
7.0.200.0030.00516.51
7.0.90.0570.08019.96
7.0.80.0230.05019.93
7.0.70.0130.08319.90
7.0.60.0130.08020.06
7.0.50.0130.07020.30
7.0.40.0070.08320.10
7.0.30.0030.05720.09
7.0.20.0130.05020.06
7.0.10.0070.05320.09
7.0.00.0030.08320.12
5.6.280.0000.03321.00
5.6.240.0130.07720.60
5.6.230.0170.07320.66
5.6.220.0130.07320.66
5.6.210.0200.07320.47
5.6.200.0070.08721.11
5.6.190.0130.07321.05
5.6.180.0100.07320.96
5.6.170.0130.07321.02
5.6.160.0170.07321.06
5.6.150.0170.07720.96
5.6.140.0130.03321.09
5.6.130.0200.07021.04
5.6.120.0170.07721.01
5.6.110.0100.08721.04
5.6.100.0030.08721.03
5.6.90.0100.07320.91
5.6.80.0130.07320.55
5.6.70.0000.08720.47
5.6.60.0030.04020.50
5.6.50.0170.07020.34
5.6.40.0070.08020.49
5.6.30.0070.07720.30
5.6.20.0130.05720.39
5.6.10.0030.07320.41
5.6.00.0030.06720.42
5.5.380.0130.07020.43
5.5.370.0100.08020.50
5.5.360.0030.08320.43
5.5.350.0030.06320.38
5.5.340.0100.06020.76
5.5.330.0000.05720.90
5.5.320.0070.07720.81
5.5.310.0130.07320.76
5.5.300.0030.06320.80
5.5.290.0070.08320.93
5.5.280.0030.05720.90
5.5.270.0170.07320.80
5.5.260.0100.06720.63
5.5.250.0070.05020.66
5.5.240.0130.05020.21
5.5.230.0030.08020.29
5.5.220.0100.03320.18
5.5.210.0000.07320.20
5.5.200.0030.08020.22
5.5.190.0000.05020.13
5.5.180.0170.06720.24
5.5.160.0030.08020.15
5.5.150.0230.06320.12
5.5.140.0030.06720.27
5.5.130.0100.07320.15
5.5.120.0130.07019.99
5.5.110.0100.05020.21
5.5.100.0170.03720.10
5.5.90.0000.04320.16
5.5.80.0070.08020.01
5.5.70.0230.04020.14
5.5.60.0130.07020.13
5.5.50.0030.04720.09
5.5.40.0030.08019.99
5.5.30.0070.07719.99
5.5.20.0130.07020.05
5.5.10.0170.06720.11
5.5.00.0000.05020.00

preferences:
89.99 ms | 401 KiB | 5 Q