3v4l.org

run code in 300+ PHP versions simultaneously
<?php class JsonSerializer { public static function serialize($value) { var_dump($value); } public function __call($method, $args) { if ('serialize' !== strtolower($method)) { throw new \BadMethodCallException('Call to undefined method '.__CLASS__."::$method"); } return self::serialize(...$args); } } JsonSerializer::serialize('foo'); (new JsonSerializer())->serialize('bar'); try { (new JsonSerializer())->baz('qux'); } catch (\Exception $e) { var_dump($e->getMessage()); }

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.0090.01216.75
8.3.50.0070.00716.47
8.3.40.0070.01418.79
8.3.30.0090.00518.83
8.3.20.0000.00720.33
8.3.10.0100.00021.85
8.3.00.0050.00319.68
8.2.180.0120.00918.29
8.2.170.0080.00822.96
8.2.160.0100.00619.05
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0040.00419.33
8.2.120.0040.00426.35
8.2.110.0060.00321.13
8.2.100.0110.00017.83
8.2.90.0040.00419.08
8.2.80.0000.00817.97
8.2.70.0080.00017.75
8.2.60.0060.00318.04
8.2.50.0030.00618.10
8.2.40.0050.00220.55
8.2.30.0050.00219.36
8.2.20.0070.00017.98
8.2.10.0050.00318.07
8.2.00.0070.00017.96
8.1.280.0140.00025.92
8.1.270.0050.00322.11
8.1.260.0070.00026.35
8.1.250.0030.00528.09
8.1.240.0030.00619.20
8.1.230.0070.00319.10
8.1.220.0040.00417.74
8.1.210.0070.00318.77
8.1.200.0060.00317.35
8.1.190.0060.00317.23
8.1.180.0000.00818.10
8.1.170.0040.00418.97
8.1.160.0040.00418.88
8.1.150.0000.00820.63
8.1.140.0070.00719.58
8.1.130.0000.00917.37
8.1.120.0000.00717.38
8.1.110.0040.00417.41
8.1.100.0000.00817.52
8.1.90.0080.00017.43
8.1.80.0040.00417.48
8.1.70.0050.00317.51
8.1.60.0020.00917.42
8.1.50.0040.00417.54
8.1.40.0070.00417.50
8.1.30.0080.00017.64
8.1.20.0040.00417.55
8.1.10.0040.00417.56
8.1.00.0000.00717.43
8.0.300.0000.00819.77
8.0.290.0000.00816.63
8.0.280.0000.00718.35
8.0.270.0050.00317.14
8.0.260.0030.00316.76
8.0.250.0000.00717.02
8.0.240.0030.00317.05
8.0.230.0030.00317.05
8.0.220.0070.00016.99
8.0.210.0030.00316.83
8.0.200.0000.00617.04
8.0.190.0080.00016.92
8.0.180.0070.00016.97
8.0.170.0000.00716.82
8.0.160.0040.00416.95
8.0.150.0000.00716.79
8.0.140.0030.00316.89
8.0.130.0030.00313.39
8.0.120.0050.00216.82
8.0.110.0000.00716.86
8.0.100.0030.00516.86
8.0.90.0000.00717.09
8.0.80.0090.00616.95
8.0.70.0000.00817.02
8.0.60.0040.00417.03
8.0.50.0040.00416.91
8.0.30.0120.00717.11
8.0.20.0090.00917.40
8.0.10.0000.00717.06
8.0.00.0150.00916.75
7.4.330.0000.00615.55
7.4.320.0030.00316.54
7.4.300.0030.00316.42
7.4.290.0040.00416.61
7.4.280.0000.00716.65
7.4.270.0030.00316.61
7.4.260.0050.00316.50
7.4.250.0000.00816.47
7.4.240.0040.00416.65
7.4.230.0030.00316.64
7.4.220.0160.00616.54
7.4.210.0090.00916.64
7.4.200.0000.00716.42
7.4.160.0090.01116.47
7.4.150.0180.02217.40
7.4.140.0120.00817.86
7.4.130.0160.00316.38
7.4.120.0100.01116.55
7.4.110.0120.00616.46
7.4.100.0150.00916.46
7.4.90.0060.01016.70
7.4.80.0110.00519.39
7.4.70.0030.01716.63
7.4.60.0090.00916.61
7.4.50.0070.01016.58
7.4.40.0080.01116.18
7.4.30.0110.00716.66
7.4.00.0060.00615.10
7.3.330.0060.00013.40
7.3.320.0000.00613.25
7.3.310.0000.00716.48
7.3.300.0030.00316.44
7.3.290.0080.00916.38
7.3.280.0080.00816.42
7.3.270.0090.00917.40
7.3.260.0110.00716.67
7.3.250.0120.00616.43
7.3.240.0100.00916.67
7.3.230.0100.01316.53
7.3.210.0070.01016.45
7.3.200.0030.01316.35
7.3.190.0130.00316.36
7.3.180.0090.00816.41
7.3.170.0120.00316.50
7.3.160.0120.00416.41
7.3.10.0060.00616.63
7.3.00.0090.00316.69
7.2.330.0030.01716.64
7.2.320.0030.01516.64
7.2.310.0030.01316.27
7.2.300.0030.01516.59
7.2.290.0140.00716.36
7.2.130.0030.00717.01
7.2.120.0080.00616.73
7.2.110.0060.00816.97
7.2.100.0080.00616.63
7.2.90.0080.00916.92
7.2.80.0080.00316.96
7.2.70.0040.00816.99
7.2.60.0040.00716.84
7.2.50.0060.00716.85
7.2.40.0090.00416.99
7.2.30.0080.00616.93
7.2.20.0040.01017.10
7.2.10.0050.00916.82
7.2.00.0030.01017.54
7.1.250.0030.00615.77
7.1.240.0000.00915.56
7.1.230.0100.00715.81
7.1.220.0030.01015.76
7.1.210.0100.00615.82
7.1.200.0030.01015.74
7.1.190.0060.00315.77
7.1.180.0060.00915.86
7.1.170.0030.00815.76
7.1.160.0140.00315.64
7.1.150.0040.00415.48
7.1.140.0000.01315.79
7.1.130.0040.01115.96
7.1.120.0000.01015.79
7.1.110.0000.01415.51
7.1.100.0030.01016.93
7.1.90.0060.00615.77
7.1.80.0040.01115.90
7.1.70.0090.00816.34
7.1.60.0130.01225.32
7.1.50.0180.00625.25
7.1.40.0140.00825.18
7.1.30.0080.01825.07
7.1.20.0100.01325.17
7.1.10.0030.01216.23
7.1.00.0080.00716.22
7.0.330.0090.00615.48
7.0.320.0000.01215.34
7.0.310.0090.00015.12
7.0.300.0040.01115.48
7.0.290.0140.00015.45
7.0.280.0040.01115.19
7.0.270.0070.01015.48
7.0.260.0100.00315.46
7.0.250.0040.00715.61
7.0.240.0100.00715.51
7.0.230.0080.00415.59
7.0.220.0060.00915.40
7.0.210.0040.01115.38
7.0.200.0030.01015.99
7.0.190.0050.00616.13
7.0.180.0050.00615.74
7.0.170.0080.00415.72
7.0.160.0090.00515.89
7.0.150.0080.00815.80
7.0.140.0060.00615.64
7.0.130.0090.00515.86
7.0.120.0030.00816.02
7.0.110.0050.00915.87
7.0.100.0050.00915.76
7.0.90.0060.00615.97
7.0.80.0040.01215.94
7.0.70.0080.00415.96
7.0.60.0050.01015.79
7.0.50.0050.00916.01
7.0.40.0080.00315.02
7.0.30.0050.00814.95
7.0.20.0030.01214.97
7.0.10.0050.00914.87
7.0.00.0040.01114.82
5.6.380.0060.01014.47

preferences:
42.72 ms | 401 KiB | 5 Q