3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $a = 'a'; } class B implements \JsonSerialize { protected $a; function __construct(A $a) { $this->a = $a; } function jsonSerialize() { return [ 'a' => $this->a ]; } } $b = new B(new A()); echo json_encode($b);

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.0180.00418.35
8.3.60.0120.00918.68
8.3.50.0150.00721.99
8.3.40.0140.00018.82
8.3.30.0070.00718.69
8.3.20.0080.00020.25
8.3.10.0050.00320.57
8.3.00.0170.00023.61
8.2.190.0140.00016.78
8.2.180.0150.00618.29
8.2.170.0150.00022.96
8.2.160.0130.00020.38
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00222.08
8.2.120.0060.00826.35
8.2.110.0060.00320.43
8.2.100.0120.00317.78
8.2.90.0030.00519.40
8.2.80.0040.00417.97
8.2.70.0000.00917.50
8.2.60.0040.00817.80
8.2.50.0040.00419.28
8.2.40.0080.00020.60
8.2.30.0000.00820.47
8.2.20.0000.00718.07
8.2.10.0030.00617.96
8.2.00.0000.00718.08
8.1.280.0190.00625.92
8.1.270.0040.00420.78
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0070.00423.84
8.1.230.0040.00817.64
8.1.220.0000.01117.74
8.1.210.0040.00418.77
8.1.200.0090.00017.35
8.1.190.0030.00617.22
8.1.180.0050.00318.10
8.1.170.0040.00418.55
8.1.160.0000.00718.85
8.1.150.0000.00720.14
8.1.140.0040.00419.47
8.1.130.0030.00318.84
8.1.120.0070.00017.41
8.1.110.0030.00517.36
8.1.100.0060.00317.24
8.1.90.0050.00217.33
8.1.80.0000.00717.29
8.1.70.0000.00717.44
8.1.60.0030.00517.37
8.1.50.0030.00517.35
8.1.40.0060.00317.34
8.1.30.0080.00017.45
8.1.20.0000.00717.63
8.1.10.0040.00417.39
8.1.00.0040.00417.33
8.0.300.0000.00818.77
8.0.290.0050.00316.88
8.0.280.0000.00718.38
8.0.270.0030.00317.25
8.0.260.0000.00717.21
8.0.250.0040.00417.02
8.0.240.0040.00417.01
8.0.230.0030.00317.04
8.0.220.0080.00016.93
8.0.210.0030.00316.95
8.0.200.0000.00616.88
8.0.190.0070.00016.93
8.0.180.0030.00517.02
8.0.170.0020.00516.97
8.0.160.0070.00016.92
8.0.150.0040.00416.94
8.0.140.0030.00516.82
8.0.130.0030.00313.34
8.0.120.0070.00016.96
8.0.110.0000.00716.94
8.0.100.0030.00616.86
8.0.90.0040.00416.76
8.0.80.0000.02117.03
8.0.70.0040.00416.73
8.0.60.0020.00516.98
8.0.50.0000.00716.77
8.0.30.0080.01217.11
8.0.20.0120.00717.40
8.0.10.0000.00716.99
8.0.00.0070.01016.55
7.4.330.0000.00515.55
7.4.320.0030.00316.47
7.4.300.0000.00616.33
7.4.290.0030.00716.43
7.4.280.0030.00316.54
7.4.270.0030.00316.54
7.4.260.0030.00516.33
7.4.250.0040.00416.41
7.4.240.0050.00216.53
7.4.230.0040.00416.61
7.4.220.0090.00916.63
7.4.210.0140.00016.57
7.4.200.0030.00316.44
7.4.160.0090.00616.47
7.4.150.0120.00917.40
7.4.140.0130.00817.86
7.4.130.0070.01216.60
7.4.120.0150.00716.50
7.4.110.0130.01016.54
7.4.100.0030.01316.58
7.4.90.0140.00616.39
7.4.80.0090.01219.39
7.4.70.0100.01016.50
7.4.60.0080.00816.41
7.4.50.0030.01416.48
7.4.40.0120.00916.46
7.4.30.0090.00916.62
7.4.00.0070.01114.70
7.3.330.0060.00013.24
7.3.320.0030.00313.09
7.3.310.0000.00616.19
7.3.300.0000.00716.06
7.3.290.0080.00616.24
7.3.280.0090.00716.22
7.3.270.0120.00617.40
7.3.260.0060.01116.38
7.3.250.0120.00516.30
7.3.240.0150.00716.51
7.3.230.0030.01416.39
7.3.210.0100.00916.41
7.3.200.0100.00716.28
7.3.190.0120.00616.25
7.3.180.0070.01016.41
7.3.170.0220.00016.47
7.3.160.0130.00316.34
7.3.10.0070.00716.41
7.3.00.0100.00316.49
7.2.330.0160.00616.36
7.2.320.0100.00616.39
7.2.310.0080.00916.37
7.2.300.0060.01216.55
7.2.290.0090.00916.65
7.2.130.0030.00916.79
7.2.120.0060.00616.80
7.2.110.0030.00916.65
7.2.100.0080.00616.80
7.2.90.0030.00916.61
7.2.80.0030.00716.55
7.2.70.0070.00716.67
7.2.60.0070.00716.73
7.2.50.0070.00516.91
7.2.40.0100.00616.81
7.2.30.0030.00816.65
7.2.20.0050.00816.71
7.2.10.0080.00616.80
7.2.00.0080.00516.79
7.1.250.0000.01015.86
7.1.240.0030.01015.38
7.1.230.0060.01015.57
7.1.220.0130.00015.61
7.1.210.0090.00615.73
7.1.200.0090.00615.53
7.1.190.0030.01015.69
7.1.180.0030.00615.56
7.1.170.0000.01115.81
7.1.160.0000.01515.73
7.1.150.0030.00915.63
7.1.140.0000.01115.63
7.1.130.0060.00915.35
7.1.120.0100.00315.83
7.1.110.0070.00415.71
7.1.100.0000.01515.32
7.1.90.0110.00315.79
7.1.80.0090.00615.56
7.1.70.0000.01016.31
7.1.60.0060.01316.30
7.1.50.0060.01216.01
7.1.40.0040.00815.50
7.1.30.0000.01115.71
7.1.20.0220.04226.92
7.1.10.0130.03018.79
7.1.00.0080.03118.95
7.0.330.0100.00315.27
7.0.320.0030.00615.29
7.0.310.0040.01114.95
7.0.300.0080.00415.22
7.0.290.0070.00415.15
7.0.280.0110.00315.26
7.0.270.0040.00715.09
7.0.260.0040.00914.90
7.0.250.0030.01015.29
7.0.240.0070.00715.10
7.0.230.0040.01115.30
7.0.220.0030.00714.95
7.0.210.0040.01115.28
7.0.200.0080.00715.78
7.0.190.0070.00715.36
7.0.180.0060.00315.34
7.0.170.0030.00714.98
7.0.160.0050.03718.54
7.0.150.0050.03418.52
7.0.140.0100.03018.57
7.0.130.0050.03318.50
7.0.120.0120.02718.43
7.0.110.0080.03518.46
7.0.100.0100.02818.57
7.0.90.0070.03218.60
7.0.80.0100.04218.57
7.0.70.0090.03518.49
7.0.60.0030.03818.56
7.0.50.0100.03218.60
7.0.40.0100.03117.55
7.0.30.0120.03317.52
7.0.20.0140.02517.45
7.0.10.0100.02817.56
7.0.00.0080.04217.56
5.6.380.0060.00314.38

preferences:
47.58 ms | 401 KiB | 5 Q