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; } public 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.0120.00616.75
8.3.60.0070.01418.43
8.3.50.0150.00722.05
8.3.40.0070.00718.87
8.3.30.0070.00718.89
8.3.20.0000.00720.34
8.3.10.0080.00020.48
8.3.00.0000.00823.62
8.2.180.0170.00318.41
8.2.170.0090.00622.96
8.2.160.0090.00420.52
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00422.21
8.2.120.0110.00426.35
8.2.110.0030.00619.27
8.2.100.0110.00417.91
8.2.90.0030.00619.22
8.2.80.0050.00317.97
8.2.70.0000.00917.63
8.2.60.0060.00617.91
8.2.50.0050.00319.27
8.2.40.0040.00420.32
8.2.30.0050.00220.32
8.2.20.0000.00718.01
8.2.10.0000.00718.00
8.2.00.0000.00718.26
8.1.280.0180.00725.92
8.1.270.0070.00020.73
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0130.01021.24
8.1.230.0090.00317.70
8.1.220.0030.00517.78
8.1.210.0080.00018.77
8.1.200.0070.00317.35
8.1.190.0060.00317.23
8.1.180.0030.00618.10
8.1.170.0040.00418.66
8.1.160.0040.00418.75
8.1.150.0040.00420.38
8.1.140.0030.00619.58
8.1.130.0030.00518.86
8.1.120.0000.00717.40
8.1.110.0060.00317.45
8.1.100.0040.00417.39
8.1.90.0030.00317.43
8.1.80.0030.00317.37
8.1.70.0030.00317.39
8.1.60.0000.00917.52
8.1.50.0040.00417.42
8.1.40.0030.00617.39
8.1.30.0030.00517.50
8.1.20.0000.00817.63
8.1.10.0040.00417.54
8.1.00.0050.00317.43
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0030.00318.50
8.0.270.0000.00717.28
8.0.260.0030.00317.20
8.0.250.0000.00716.91
8.0.240.0000.00716.91
8.0.230.0030.00316.91
8.0.220.0080.00016.85
8.0.210.0070.00016.97
8.0.200.0030.00316.89
8.0.190.0040.00416.89
8.0.180.0050.00316.95
8.0.170.0040.00417.03
8.0.160.0040.00417.03
8.0.150.0000.00716.79
8.0.140.0000.00816.89
8.0.130.0000.00513.41
8.0.120.0000.00716.82
8.0.110.0030.00517.02
8.0.100.0100.00017.03
8.0.90.0000.00816.89
8.0.80.0030.01716.88
8.0.70.0000.00816.92
8.0.60.0050.00317.03
8.0.50.0070.00016.93
8.0.30.0070.01017.20
8.0.20.0130.00617.40
8.0.10.0030.00516.98
8.0.00.0030.01416.68
7.4.330.0020.00215.55
7.4.320.0060.00016.34
7.4.300.0030.00316.49
7.4.290.0000.00916.58
7.4.280.0030.00316.55
7.4.270.0070.00016.43
7.4.260.0000.00716.45
7.4.250.0040.00416.40
7.4.240.0070.00016.32
7.4.230.0070.00016.19
7.4.220.0090.00916.57
7.4.210.0090.01216.52
7.4.200.0050.00216.33
7.4.160.0110.00716.41
7.4.150.0120.00617.40
7.4.140.0110.00917.86
7.4.130.0080.01016.53
7.4.120.0120.01116.59
7.4.110.0110.01116.44
7.4.100.0090.00916.45
7.4.90.0170.00716.60
7.4.80.0120.00419.39
7.4.70.0130.00416.35
7.4.60.0100.00616.47
7.4.50.0070.00616.61
7.4.40.0060.01616.61
7.4.30.0070.01016.65
7.4.00.0050.01214.76
7.3.330.0050.00013.21
7.3.320.0000.00513.10
7.3.310.0000.00716.27
7.3.300.0030.00316.09
7.3.290.0080.01216.22
7.3.280.0090.00916.23
7.3.270.0130.00417.40
7.3.260.0090.01016.31
7.3.250.0050.01216.31
7.3.240.0060.01316.49
7.3.230.0070.01116.39
7.3.210.0090.01116.43
7.3.200.0070.01016.34
7.3.190.0070.01016.24
7.3.180.0090.00616.55
7.3.170.0040.01516.13
7.3.160.0080.00816.17
7.3.120.0100.00614.50
7.3.110.0040.01514.67
7.3.100.0070.01014.91
7.3.90.0070.00714.79
7.3.80.0060.00914.46
7.3.70.0030.00714.75
7.3.60.0040.01114.79
7.3.50.0000.01114.84
7.3.40.0000.00914.70
7.3.30.0060.01014.71
7.3.20.0090.00316.68
7.3.10.0030.01016.32
7.3.00.0040.00716.69
7.2.330.0100.01016.33
7.2.320.0100.00716.22
7.2.310.0100.00716.31
7.2.300.0110.00816.41
7.2.290.0110.01216.23
7.2.250.0070.01114.65
7.2.240.0060.00615.14
7.2.230.0090.00614.71
7.2.220.0080.00514.77
7.2.210.0090.00914.74
7.2.200.0150.00014.44
7.2.190.0100.00615.05
7.2.180.0070.00714.97
7.2.170.0040.00814.71
7.2.160.0030.01014.91
7.2.150.0070.00416.75
7.2.140.0040.01116.59
7.2.130.0030.00616.63
7.2.120.0000.01016.39
7.2.110.0050.00916.50
7.2.100.0110.00016.57
7.2.90.0040.01517.03
7.2.80.0030.01216.95
7.2.70.0060.00316.82
7.2.60.0050.00816.72
7.2.50.0030.01216.85
7.2.40.0030.01416.82
7.2.30.0030.01216.52
7.2.20.0060.01017.00
7.2.10.0060.00916.82
7.2.00.0070.00716.70
7.1.330.0100.00715.46
7.1.320.0080.00615.76
7.1.310.0060.00915.57
7.1.300.0080.00415.57
7.1.290.0060.00915.54
7.1.280.0080.00815.52
7.1.270.0080.00315.42
7.1.260.0140.00015.85
7.1.250.0000.01515.41
7.1.240.0040.00815.75
7.1.230.0000.00915.50
7.1.220.0030.01015.69
7.1.210.0030.01115.50
7.1.200.0030.00715.50
7.1.190.0000.01415.71
7.1.180.0070.01015.80
7.1.170.0120.00315.45
7.1.160.0110.00615.69
7.1.150.0000.01415.73
7.1.140.0060.00315.68
7.1.130.0060.00615.74
7.1.120.0040.00715.58
7.1.110.0040.01415.57
7.1.100.0040.01215.80
7.1.90.0030.00715.68
7.1.80.0090.00915.73
7.1.70.0040.00616.46
7.1.60.0040.01416.18
7.1.50.0050.01616.30
7.1.40.0070.00415.83
7.1.30.0090.00315.60
7.1.20.0180.04326.89
7.1.10.0070.03618.83
7.1.00.0070.03418.92
7.0.330.0040.00715.29
7.0.320.0040.01115.25
7.0.310.0070.00314.91
7.0.300.0110.00315.31
7.0.290.0060.00614.95
7.0.280.0070.00715.07
7.0.270.0030.01015.24
7.0.260.0030.01015.34
7.0.250.0060.00315.34
7.0.240.0090.00615.12
7.0.230.0090.00915.50
7.0.220.0040.00915.04
7.0.210.0080.00015.29
7.0.200.0070.01016.02
7.0.190.0030.00715.13
7.0.180.0070.00715.25
7.0.170.0000.01015.19
7.0.160.0130.02718.55
7.0.150.0120.03018.63
7.0.140.0150.02518.58
7.0.130.0090.03218.35
7.0.120.0070.03718.59
7.0.110.0050.03418.58
7.0.100.0030.03518.56
7.0.90.0080.03518.67
7.0.80.0050.03518.52
7.0.70.0100.03018.62
7.0.60.0070.03418.39
7.0.50.0080.03018.48
7.0.40.0080.03017.66
7.0.30.0070.03117.68
7.0.20.0150.04017.50
7.0.10.0070.04117.62
7.0.00.0100.03817.63
5.6.400.0060.00914.29
5.6.390.0070.00713.96
5.6.380.0150.00414.46
5.6.370.0000.01114.50
5.6.360.0030.01314.27
5.6.350.0000.01114.02
5.6.340.0040.00714.43
5.6.330.0110.00314.54
5.6.320.0100.00714.10
5.6.310.0030.00814.22
5.6.300.0060.00914.15
5.6.290.0000.01114.30
5.6.280.0070.00714.29
5.6.270.0040.00413.91
5.6.260.0070.00714.37
5.6.250.0030.00614.34
5.6.240.0000.01414.05
5.6.230.0030.01014.27
5.6.220.0040.00714.06
5.6.210.0070.00714.17
5.6.200.0030.01014.27
5.6.190.0060.00614.00
5.6.180.0070.00314.08
5.6.170.0040.00414.36
5.6.160.0080.00813.89
5.6.150.0120.00313.96
5.6.140.0030.01014.19
5.6.130.0040.00814.25
5.6.120.0120.00014.37
5.6.110.0090.00013.95
5.6.100.0040.01214.23
5.6.90.0070.00314.18
5.6.80.0060.00814.16
5.6.70.0080.00814.31
5.6.60.0040.01114.20
5.6.50.0080.00813.89
5.6.40.0100.00313.98
5.6.30.0060.00913.84
5.6.20.0040.00914.23
5.6.10.0040.00813.96
5.6.00.0030.00614.07

preferences:
58.74 ms | 401 KiB | 5 Q