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 '.__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.0110.01116.50
8.3.50.0070.00716.50
8.3.40.0070.00718.82
8.3.30.0110.00718.84
8.3.20.0040.00420.13
8.3.10.0030.00623.48
8.3.00.0030.00519.68
8.2.180.0110.00425.92
8.2.170.0030.01418.91
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0030.00624.66
8.2.130.0040.00419.30
8.2.120.0040.00426.35
8.2.110.0070.00420.91
8.2.100.0120.00017.91
8.2.90.0000.00819.27
8.2.80.0000.00818.04
8.2.70.0040.00817.50
8.2.60.0050.00317.93
8.2.50.0060.00318.10
8.2.40.0030.00620.52
8.2.30.0050.00219.11
8.2.20.0020.00518.12
8.2.10.0000.00918.13
8.2.00.0040.00418.07
8.1.280.0100.00725.92
8.1.270.0040.00422.19
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0150.00821.30
8.1.230.0070.00419.10
8.1.220.0050.00517.80
8.1.210.0000.00918.77
8.1.200.0060.00317.35
8.1.190.0000.00817.35
8.1.180.0050.00218.10
8.1.170.0040.00419.02
8.1.160.0030.00418.94
8.1.150.0030.00620.63
8.1.140.0060.00319.46
8.1.130.0000.00818.95
8.1.120.0040.00417.55
8.1.110.0030.00517.43
8.1.100.0000.00817.41
8.1.90.0000.00917.49
8.1.80.0040.00417.44
8.1.70.0040.00417.45
8.1.60.0090.00317.58
8.1.50.0070.00017.57
8.1.40.0040.00517.56
8.1.30.0000.00717.56
8.1.20.0070.00017.59
8.1.10.0000.00817.54
8.1.00.0040.00417.50
8.0.300.0030.00519.84
8.0.290.0000.00816.63
8.0.280.0000.00718.39
8.0.270.0040.00417.16
8.0.260.0070.00016.84
8.0.250.0050.00316.87
8.0.240.0030.00317.04
8.0.230.0040.00416.83
8.0.220.0000.00716.79
8.0.210.0000.00716.89
8.0.200.0060.00016.87
8.0.190.0000.00816.86
8.0.180.0040.00416.94
8.0.170.0000.00716.91
8.0.160.0000.00717.03
8.0.150.0050.00216.93
8.0.140.0000.00816.90
8.0.130.0030.00313.40
8.0.120.0030.00616.87
8.0.110.0040.00416.98
8.0.100.0030.00517.07
8.0.90.0000.00717.03
8.0.80.0060.00916.99
8.0.70.0040.00416.79
8.0.60.0000.00716.93
8.0.50.0000.00817.00
8.0.30.0090.00717.14
8.0.20.0100.00917.42
8.0.10.0040.00416.98
8.0.00.0140.00316.99
7.4.330.0070.00015.55
7.4.320.0040.00416.58
7.4.300.0000.00616.47
7.4.290.0070.00016.59
7.4.280.0040.00416.51
7.4.270.0000.00716.43
7.4.260.0070.00016.41
7.4.250.0030.00516.40
7.4.240.0020.00516.57
7.4.230.0030.00316.44
7.4.220.0160.00916.62
7.4.210.0110.00816.45
7.4.200.0000.00816.50
7.4.160.0110.00616.54
7.4.150.0100.01117.40
7.4.140.0110.00717.86
7.4.130.0140.01416.38
7.4.120.0120.00716.40
7.4.110.0070.01016.61
7.4.100.0040.02016.45
7.4.90.0170.00016.61
7.4.80.0160.00719.39
7.4.70.0090.00916.55
7.4.60.0060.00916.56
7.4.50.0080.00716.36
7.4.40.0060.01216.68
7.4.30.0040.01216.20
7.4.00.0030.00915.03
7.3.330.0060.00013.22
7.3.320.0050.00013.14
7.3.310.0030.00316.36
7.3.300.0070.00016.32
7.3.290.0060.00816.34
7.3.280.0070.01016.36
7.3.270.0070.01117.40
7.3.260.0110.01016.54
7.3.250.0130.00416.42
7.3.240.0090.01116.32
7.3.230.0110.00816.39
7.3.210.0080.00816.42
7.3.200.0130.00316.47
7.3.190.0160.00016.57
7.3.180.0060.01616.42
7.3.170.0110.00616.38
7.3.160.0060.01016.34
7.3.10.0000.01316.36
7.3.00.0040.00716.66
7.2.330.0130.00316.49
7.2.320.0090.01216.66
7.2.310.0110.00616.59
7.2.300.0070.01016.51
7.2.290.0140.00616.39
7.2.130.0030.01016.66
7.2.120.0060.00916.88
7.2.110.0090.00616.73
7.2.100.0040.01216.59
7.2.90.0090.00316.99
7.2.80.0100.00716.92
7.2.70.0070.00716.81
7.2.60.0050.00916.76
7.2.50.0070.00716.99
7.2.40.0000.01016.77
7.2.30.0070.01017.00
7.2.20.0060.01017.03
7.2.10.0060.00916.92
7.2.00.0030.01018.23
7.1.250.0000.01115.75
7.1.240.0110.00415.72
7.1.230.0070.00715.45
7.1.220.0070.00715.76
7.1.210.0080.00815.61
7.1.200.0050.00815.72
7.1.190.0070.01015.63
7.1.180.0040.00915.69
7.1.170.0030.01015.65
7.1.160.0080.00815.47
7.1.150.0040.01115.77
7.1.140.0030.00615.92
7.1.130.0110.00415.82
7.1.120.0000.01415.62
7.1.110.0090.00615.84
7.1.100.0050.00916.71
7.1.90.0030.01015.66
7.1.80.0130.00015.64
7.1.70.0050.00616.48
7.1.60.0120.00825.33
7.1.50.0120.01125.15
7.1.40.0080.01125.01
7.1.30.0140.00725.10
7.1.20.0140.00925.09
7.1.10.0040.01016.31
7.1.00.0080.00616.21
7.0.330.0000.01515.18
7.0.320.0040.00415.26
7.0.310.0030.00715.36
7.0.300.0030.01015.16
7.0.290.0090.00615.29
7.0.280.0030.01015.52
7.0.270.0080.00015.28
7.0.260.0060.00315.16
7.0.250.0030.00615.31
7.0.240.0080.00315.36
7.0.230.0000.00915.22
7.0.220.0100.00315.14
7.0.210.0060.00915.34
7.0.200.0070.00516.06
7.0.190.0030.01016.04
7.0.180.0060.00515.80
7.0.170.0070.00415.90
7.0.160.0030.01115.85
7.0.150.0030.01115.84
7.0.140.0010.01015.70
7.0.130.0060.01015.90
7.0.120.0100.00315.99
7.0.110.0050.01115.90
7.0.100.0070.00715.82
7.0.90.0080.00815.80
7.0.80.0070.00615.84
7.0.70.0030.01115.81
7.0.60.0050.00515.66
7.0.50.0050.00815.90
7.0.40.0050.00914.90
7.0.30.0070.00515.08
7.0.20.0030.00914.83
7.0.10.0030.01015.00
7.0.00.0040.00814.98
5.6.380.0030.00914.40

preferences:
48.47 ms | 401 KiB | 5 Q