3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); class X { } class Model { protected function getHintableProps(): X { return new X(); } } class HelloWorld { /** * @param class-string<Model> $cl */ public function sayHello(string $cl): X { $model = new Model(); return \Closure::bind(function () use ($model): X { return $model->getHintableProps(); }, null, $cl)(); } } var_dump((new HelloWorld())->sayHello(Model::class));

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.130.0100.00718.31
8.3.120.0040.00419.04
8.3.110.0050.00316.63
8.3.100.0030.00616.74
8.3.90.0040.00426.77
8.3.80.0030.00616.75
8.3.70.0040.01216.59
8.3.60.0070.00716.50
8.3.50.0170.00316.64
8.3.40.0090.00618.85
8.3.30.0070.01118.70
8.3.20.0060.00324.18
8.3.10.0080.00024.66
8.3.00.0050.00326.16
8.2.250.0040.00416.59
8.2.240.0060.00319.17
8.2.230.0060.00320.94
8.2.220.0000.00824.06
8.2.210.0160.00426.77
8.2.200.0060.00316.38
8.2.190.0120.00616.75
8.2.180.0110.01125.92
8.2.170.0070.01419.02
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0030.00624.66
8.2.130.0050.00226.16
8.2.120.0000.00721.04
8.2.110.0030.00619.38
8.2.100.0040.00817.78
8.2.90.0080.00017.75
8.2.80.0030.00518.80
8.2.70.0060.00317.63
8.2.60.0040.00418.03
8.2.50.0000.00818.05
8.2.40.0030.00519.76
8.2.30.0040.00418.03
8.2.20.0080.00018.13
8.2.10.0000.00719.25
8.2.00.0040.00419.13
8.1.300.0130.00617.71
8.1.290.0040.00430.84
8.1.280.0210.00025.92
8.1.270.0000.00823.99
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00322.08
8.1.230.0060.00620.90
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.13
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0000.00818.49
8.1.160.0030.00718.93
8.1.150.0040.00418.82
8.1.140.0000.00818.82
8.1.130.0000.00820.14
8.1.120.0050.00317.44
8.1.110.0070.00017.45
8.1.100.0040.00417.37
8.1.90.0040.00417.48
8.1.80.0040.00417.48
8.1.70.0000.00717.48
8.1.60.0000.00817.58
8.1.50.0000.00917.57
8.1.40.0040.00417.58
8.1.30.0030.00617.64
8.1.20.0040.00417.62
8.1.10.0040.00417.50
8.1.00.0040.00417.44
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0000.00818.37
8.0.270.0000.00717.93
8.0.260.0030.00318.45
8.0.250.0000.00716.98
8.0.240.0040.00416.87
8.0.230.0030.00316.93
8.0.220.0070.00016.87
8.0.210.0000.00716.96
8.0.200.0030.00516.79
8.0.190.0000.00816.98
8.0.180.0100.00016.77
8.0.170.0060.00316.80
8.0.160.0050.00316.76
8.0.150.0000.00816.71
8.0.140.0000.00916.82
8.0.130.0030.00313.30
8.0.120.0040.00416.90
8.0.110.0030.00316.87
8.0.100.0040.00416.86
8.0.90.0040.00416.98
8.0.80.0090.00616.90
8.0.70.0070.00016.90
8.0.60.0000.00816.70
8.0.50.0030.00616.76
8.0.30.0170.01316.80
8.0.20.0230.00816.91
8.0.10.0180.01116.93
8.0.00.0190.01616.96
7.4.330.0060.00015.55
7.4.320.0030.00316.61
7.4.300.0060.00016.65
7.4.290.0090.00016.56
7.4.280.0040.00416.61
7.4.270.0030.00316.52
7.4.260.0030.00313.21
7.4.250.0030.00316.34
7.4.240.0050.00316.55
7.4.230.0000.00716.71
7.4.220.0000.00716.59
7.4.210.0100.00716.58
7.4.200.0070.00016.54
7.4.160.0220.00416.54
7.4.150.0150.01216.54
7.4.140.0240.01016.49
7.4.130.0260.00616.53
7.4.120.0290.00516.32
7.4.110.0290.00516.57
7.4.100.0140.01916.38
7.4.90.0150.01016.47
7.4.80.0200.00616.52
7.4.70.0160.01116.48
7.4.60.0210.00716.61
7.4.50.0180.01516.45
7.4.40.0200.01316.49
7.4.30.0250.00016.42
7.4.20.0250.00916.41
7.4.10.0210.00816.49
7.4.00.0180.01116.48
7.3.330.0030.00316.33
7.3.320.0000.00513.29
7.3.310.0000.00716.21
7.3.300.0000.00616.13
7.3.290.0090.00916.30
7.3.280.0100.01916.30
7.3.270.0210.00516.20
7.3.260.0200.00916.35
7.3.250.0170.01016.26
7.3.240.0240.00916.29
7.3.230.0260.00616.19
7.3.220.0170.01416.34
7.3.210.0180.00916.15
7.3.200.0200.00516.22
7.3.190.0230.00316.12
7.3.180.0110.01516.25
7.3.170.0240.01216.24
7.3.160.0220.01116.16
7.3.150.0180.01416.20
7.3.140.0270.00516.23
7.3.130.0220.01116.25
7.3.120.0230.00816.18
7.3.110.0160.01016.13
7.3.100.0190.00616.15
7.3.90.0120.01316.51
7.3.80.0150.01016.26
7.3.70.0200.00916.27
7.3.60.0150.01616.38
7.3.50.0150.01216.33
7.3.40.0220.00916.42
7.3.30.0240.00616.42
7.3.20.0290.00516.41
7.3.10.0190.00816.39
7.3.00.0190.00916.36

preferences:
68.54 ms | 403 KiB | 5 Q