3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public const NAME = 'Serkan'; } class PhpSpec { public function __construct($name) { $func = function($name) { return constant(get_class($this) . '::' . $name); }; $closure = $func->bindTo(new Person()); echo $closure($name); } } $spe = new PhpSpec('NAME');

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.40.0060.01118.78
8.3.30.0090.00618.85
8.3.20.0050.00320.32
8.3.10.0040.00423.78
8.3.00.0080.00019.79
8.2.170.0070.00722.96
8.2.160.0030.01719.31
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00420.35
8.2.120.0000.00826.35
8.2.110.0080.00421.18
8.2.100.0130.00019.52
8.2.90.0030.00517.84
8.2.80.0000.00920.54
8.2.70.0000.00817.93
8.2.60.0080.00017.93
8.2.50.0040.00418.21
8.2.40.0020.00720.30
8.2.30.0070.00319.25
8.2.20.0000.00718.05
8.2.10.0030.00618.05
8.2.00.0070.00018.25
8.1.270.0040.00422.25
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0100.00317.64
8.1.230.0070.00420.89
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0040.00417.23
8.1.190.0030.00617.53
8.1.180.0040.00418.10
8.1.170.0040.00418.64
8.1.160.0070.00018.95
8.1.150.0000.00720.23
8.1.140.0070.00017.66
8.1.130.0000.00819.01
8.1.120.0000.00817.46
8.1.110.0000.00817.49
8.1.100.0050.00317.50
8.1.90.0030.00317.35
8.1.80.0000.00717.34
8.1.70.0040.00417.44
8.1.60.0000.00817.47
8.1.50.0040.00417.45
8.1.40.0000.00817.38
8.1.30.0000.00817.54
8.1.20.0000.00717.55
8.1.10.0050.00317.48
8.1.00.0000.00817.48
8.0.300.0080.00020.23
8.0.290.0030.00616.58
8.0.280.0000.00718.41
8.0.270.0000.00717.27
8.0.260.0030.00516.73
8.0.250.0000.00717.00
8.0.240.0030.00316.95
8.0.230.0030.00316.86
8.0.220.0030.00316.93
8.0.210.0000.00716.91
8.0.200.0030.00316.96
8.0.190.0070.00016.93
8.0.180.0000.00716.95
8.0.170.0030.00616.97
8.0.160.0000.00716.95
8.0.150.0000.00816.71
8.0.140.0050.00316.93
8.0.130.0050.00013.33
8.0.120.0040.00416.85
8.0.110.0080.00016.88
8.0.100.0040.00416.92
8.0.90.0040.00416.78
8.0.80.0110.00716.90
8.0.70.0050.00316.92
8.0.60.0070.00016.78
8.0.50.0040.00416.92
8.0.30.0080.01117.01
8.0.20.0100.01217.40
8.0.10.0050.00317.00
8.0.00.0150.00716.70
7.4.330.0000.00515.55
7.4.320.0030.00316.58
7.4.300.0030.00316.55
7.4.290.0020.00516.61
7.4.280.0040.00416.60
7.4.270.0040.00416.64
7.4.260.0040.00416.58
7.4.250.0040.00416.52
7.4.240.0000.00716.51
7.4.230.0070.00016.63
7.4.220.0050.00316.25
7.4.210.0060.00816.58
7.4.200.0070.00016.34
7.4.160.0100.00616.55
7.4.150.0170.00017.40
7.4.140.0050.01217.86
7.4.130.0140.00316.57
7.4.120.0090.01216.55
7.4.110.0080.00816.71
7.4.100.0100.00616.61
7.4.90.0060.01616.48
7.4.80.0090.00919.39
7.4.70.0150.00616.46
7.4.60.0070.01116.53
7.4.50.0070.01016.41
7.4.40.0110.01216.38
7.4.00.0060.01014.97
7.3.330.0000.00513.20
7.3.320.0060.00013.16
7.3.310.0000.00716.32
7.3.300.0030.00316.34
7.3.290.0100.00616.30
7.3.280.0070.01116.30
7.3.270.0200.00017.40
7.3.260.0130.00516.34
7.3.250.0090.01016.49
7.3.240.0120.00616.49
7.3.230.0160.00616.22
7.3.210.0090.00616.46
7.3.200.0120.01216.48
7.3.190.0160.00016.55
7.3.180.0130.00316.23
7.3.170.0180.00316.55
7.3.160.0060.00916.32
7.3.120.0100.01014.71
7.3.110.0060.00914.66
7.3.100.0140.00314.77
7.3.90.0070.00715.04
7.3.80.0070.00414.90
7.3.70.0080.00414.92
7.3.60.0070.00714.78
7.3.50.0110.00414.70
7.3.40.0000.01114.53
7.3.30.0060.01014.73
7.3.20.0060.00316.55
7.3.10.0100.00716.51
7.3.00.0100.00316.66
7.2.330.0030.01516.80
7.2.320.0030.01316.45
7.2.310.0170.00016.82
7.2.300.0100.00716.62
7.2.290.0090.01416.69
7.2.250.0070.01014.87
7.2.240.0100.01014.95
7.2.230.0060.01014.92
7.2.220.0040.01115.25
7.2.210.0060.00915.17
7.2.200.0120.00314.93
7.2.190.0040.01114.96
7.2.180.0000.01514.77
7.2.170.0040.01214.80
7.2.60.0070.00717.12
7.2.20.0060.01020.05
7.2.10.0030.01219.76
7.2.00.0120.00920.00
7.1.330.0100.00315.67
7.1.320.0060.00615.79
7.1.310.0060.00615.74
7.1.300.0060.01015.74
7.1.290.0060.00915.67
7.1.280.0030.01015.71
7.1.270.0000.01515.45
7.1.260.0100.00715.86
7.1.200.0100.00315.67
7.1.140.0030.01118.74
7.1.130.0060.00818.39
7.1.120.0030.01518.73
7.1.110.0140.00418.20
7.1.100.0100.01018.05
7.1.90.0080.01218.03
7.1.80.0080.00518.08
7.1.70.0030.00916.91
7.1.60.0250.00734.92
7.1.50.0260.01334.47
7.1.40.0200.01934.36
7.1.30.0170.02134.49
7.1.20.0220.01334.48
7.1.10.0030.01616.40
7.1.00.0040.01416.52

preferences:
57.9 ms | 400 KiB | 5 Q