3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements JsonSerializable{ private $foo = 'bar'; private $baz = 'quux'; public function jsonSerialize(){ return ['foo'=>$this->foo, 'baz'=>$this->baz]; } } $arr = [new Foo(), new Foo(), new Foo()]; echo json_encode($arr);

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.0060.01218.68
8.3.50.0040.01118.02
8.3.40.0140.00418.60
8.3.30.0110.00318.57
8.3.20.0080.00019.13
8.3.10.0040.00421.76
8.3.00.0040.00419.68
8.2.180.0060.00916.63
8.2.170.0110.00422.96
8.2.160.0040.01119.25
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00420.51
8.2.120.0130.00626.35
8.2.110.0060.00319.30
8.2.100.0060.00617.78
8.2.90.0040.00419.25
8.2.80.0050.00317.97
8.2.70.0050.00317.61
8.2.60.0040.00417.93
8.2.50.0050.00318.10
8.2.40.0000.00720.59
8.2.30.0040.00419.42
8.2.20.0040.00418.23
8.2.10.0040.00418.05
8.2.00.0060.00318.28
8.1.280.0120.00625.92
8.1.270.0040.00422.07
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0100.00020.91
8.1.230.0080.00319.02
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0040.00417.13
8.1.180.0000.00818.10
8.1.170.0060.00318.56
8.1.160.0000.00718.74
8.1.150.0040.00420.16
8.1.140.0040.00419.52
8.1.130.0030.00318.81
8.1.120.0000.00717.48
8.1.110.0000.00817.48
8.1.100.0060.00317.48
8.1.90.0040.00417.45
8.1.80.0030.00317.45
8.1.70.0000.00717.39
8.1.60.0040.00417.50
8.1.50.0030.00617.55
8.1.40.0040.00417.52
8.1.30.0040.00417.55
8.1.20.0040.00417.64
8.1.10.0040.00417.52
8.1.00.0030.00617.49
8.0.300.0040.00419.97
8.0.290.0000.00816.63
8.0.280.0070.00018.44
8.0.270.0000.00717.26
8.0.260.0060.00019.00
8.0.250.0070.00016.97
8.0.240.0040.00416.96
8.0.230.0070.00017.01
8.0.220.0030.00316.88
8.0.210.0030.00316.90
8.0.200.0060.00016.97
8.0.190.0030.00616.84
8.0.180.0000.00716.90
8.0.170.0040.00416.84
8.0.160.0030.00316.92
8.0.150.0000.00816.84
8.0.140.0030.00316.89
8.0.130.0000.00513.25
8.0.120.0060.00316.83
8.0.110.0050.00316.92
8.0.100.0040.00416.72
8.0.90.0040.00416.95
8.0.80.0090.00616.82
8.0.70.0040.00416.71
8.0.60.0040.00416.84
8.0.50.0040.00416.84
8.0.30.0090.00616.99
8.0.20.0090.00917.40
8.0.10.0050.00316.88
8.0.00.0090.00916.80
7.4.330.0000.00615.55
7.4.320.0030.00316.53
7.4.300.0000.00616.36
7.4.290.0070.00316.63
7.4.280.0030.00516.61
7.4.270.0030.00316.47
7.4.260.0030.00316.47
7.4.250.0030.00316.39
7.4.240.0000.00816.62
7.4.230.0040.00416.33
7.4.220.0180.00716.64
7.4.210.0070.01016.63
7.4.200.0000.00716.39
7.4.160.0100.00816.50
7.4.150.0060.01217.40
7.4.140.0110.00717.86
7.4.130.0100.01616.64
7.4.120.0100.00916.53
7.4.110.0110.01016.64
7.4.100.0070.01016.45
7.4.90.0090.00916.50
7.4.80.0090.01319.39
7.4.70.0120.00616.60
7.4.60.0030.01316.36
7.4.50.0120.00316.16
7.4.40.0120.00416.29
7.4.30.0070.01016.63
7.4.00.0030.01014.84
7.3.330.0060.00013.23
7.3.320.0000.00613.26
7.3.310.0000.00716.35
7.3.300.0000.00716.32
7.3.290.0050.01016.28
7.3.280.0070.01116.26
7.3.270.0110.00717.40
7.3.260.0070.01016.33
7.3.240.0080.00816.22
7.3.230.0040.01416.30
7.3.210.0090.01016.39
7.3.200.0090.01016.14
7.3.190.0030.01316.24
7.3.180.0180.00316.64
7.3.170.0060.01116.45
7.3.160.0060.01016.24
7.3.10.0030.00816.51
7.3.00.0070.00716.68
7.2.330.0110.00616.67
7.2.320.0090.00916.66
7.2.310.0120.00516.85
7.2.300.0120.00916.67
7.2.290.0070.01016.52
7.2.130.0080.00716.83
7.2.120.0030.01317.06
7.2.110.0020.01216.78
7.2.100.0050.00916.75
7.2.90.0060.00916.87
7.2.80.0050.00916.71
7.2.70.0050.00717.04
7.2.60.0070.00716.82
7.2.50.0080.00316.72
7.2.40.0080.00516.80
7.2.30.0080.00617.06
7.2.20.0060.01017.04
7.2.10.0050.00516.81
7.2.00.0050.01017.74
7.1.250.0100.00315.70
7.1.200.0040.00815.57
7.1.100.0090.00318.16
7.1.70.0040.00417.07
7.1.60.0000.01417.16
7.1.50.2130.01732.51
7.1.40.1470.01332.50
7.1.30.2070.01032.59
7.1.20.1670.00732.51
7.1.10.1030.01314.78
7.1.00.1230.01714.77
7.0.200.0000.00716.59
7.0.190.2200.00714.61
7.0.180.1570.00714.29
7.0.170.2230.01014.43
7.0.160.1330.00714.28
7.0.150.1200.00014.41
7.0.140.1470.01014.33
7.0.130.2000.01714.32
7.0.120.2000.01014.48
7.0.110.1170.01014.32
7.0.100.2070.01314.12
7.0.90.1730.02314.52
7.0.80.0130.01014.53
7.0.70.0100.00714.36
7.0.60.0100.01013.92
7.0.50.0100.00714.36
7.0.40.0130.00314.73
7.0.30.1630.01014.56
7.0.20.0030.01014.42
7.0.10.0000.01014.40
7.0.00.0000.01014.50

preferences:
57.44 ms | 401 KiB | 5 Q