3v4l.org

run code in 300+ PHP versions simultaneously
<?php $methods = [ 'hello' => function(string $name) { echo sprintf('Hello %s!%s', $name, PHP_EOL); }, 'goodbye' => function(string $name) { echo sprintf('Goodbye %s!%s', $name, PHP_EOL); }, ]; /** * @method Talk hello(string $name) * @method Talk goodbye(string $name) */ class Talk { private $methods = []; public function __construct(array $methods) { $this->methods = $methods; } public function __call(string $method, array $arguments) { if ($func = $this->methods[$method] ?? false) { $func(...$arguments); return $this; } throw new \RuntimeException(sprintf('Missing %s method.')); } } $howdy = new Talk($methods); $howdy->hello('Jim')->goodbye('Joe');

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.4.140.0120.00917.34
8.4.130.0110.00317.81
8.4.120.0090.01124.04
8.4.110.0100.00922.32
8.4.100.0090.01117.92
8.4.90.0040.00520.68
8.4.80.0120.00718.94
8.4.70.0070.00920.52
8.4.60.0060.00820.75
8.4.50.0150.00617.69
8.4.40.0060.01317.79
8.4.30.0130.00720.46
8.4.20.0030.01618.01
8.4.10.0080.00020.54
8.3.260.0090.01016.76
8.3.250.0100.00918.93
8.3.240.0110.00817.17
8.3.230.0160.00716.62
8.3.220.0120.00718.96
8.3.210.0080.00716.59
8.3.200.0040.00516.95
8.3.190.0120.00817.24
8.3.180.0130.00716.65
8.3.170.0080.00016.53
8.3.160.0120.00618.46
8.3.150.0080.01117.16
8.3.140.0120.00617.17
8.3.130.0080.01118.46
8.3.120.0090.00020.81
8.3.110.0040.00416.50
8.3.100.0000.00824.06
8.3.90.0080.00026.77
8.3.80.0030.00616.63
8.3.70.0120.00416.61
8.3.60.0120.00316.63
8.3.50.0170.00423.64
8.3.40.0070.01321.82
8.3.30.0070.01018.79
8.3.20.0080.00524.92
8.3.10.0070.00625.16
8.3.00.0080.00625.91
8.2.290.0110.00620.47
8.2.280.0090.00818.16
8.2.270.0100.01016.72
8.2.260.0100.00720.70
8.2.250.0060.00318.35
8.2.240.0030.00618.73
8.2.230.0060.00320.94
8.2.220.0060.00337.54
8.2.210.0100.01026.77
8.2.200.0080.00016.63
8.2.190.0090.01216.58
8.2.180.0190.00825.92
8.2.170.0110.00718.89
8.2.160.0110.00322.96
8.2.150.0080.00625.66
8.2.140.0070.00625.16
8.2.130.0090.00525.91
8.2.120.0140.00323.11
8.2.110.0080.00623.95
8.2.100.0100.00621.75
8.2.90.0070.00721.85
8.2.80.0100.00221.86
8.2.70.0080.00521.86
8.2.60.0020.01021.94
8.2.50.0070.00521.88
8.2.40.0070.00522.48
8.2.30.0080.00321.91
8.2.20.0020.00921.90
8.2.10.0060.00622.54
8.2.00.0070.00722.43
8.1.330.0060.00322.10
8.1.320.0100.01016.22
8.1.310.0070.00318.67
8.1.300.0000.00820.25
8.1.290.0000.00818.88
8.1.280.0070.00725.92
8.1.270.0080.00624.83
8.1.260.0060.00526.01
8.1.250.0060.00626.88
8.1.240.0130.00323.18
8.1.230.0080.00623.28
8.1.220.0040.00721.70
8.1.210.0080.00822.22
8.1.200.0050.00821.51
8.1.190.0030.01121.51
8.1.180.0070.00421.88
8.1.170.0090.00522.08
8.1.160.0070.00922.22
8.1.150.0080.00522.31
8.1.140.0070.00522.22
8.1.130.0080.00420.76
8.1.120.0030.00720.19
8.1.110.0060.00420.26
8.1.100.0040.00620.19
8.1.90.0060.00520.15
8.1.80.0060.00620.22
8.1.70.0070.00520.79
8.1.60.0060.00520.29
8.1.50.0050.00520.30
8.1.40.0080.00420.84
8.1.30.0100.00120.35
8.1.20.0070.00420.28
8.1.10.0100.00922.54
8.1.00.0060.00620.25
8.0.300.0070.00322.67
8.0.290.0110.00621.14
8.0.280.0140.00322.02
8.0.270.0080.00321.84
8.0.260.0060.00719.79
8.0.250.0070.00419.83
8.0.240.0090.00520.40
8.0.230.0070.00620.35
8.0.220.0070.00419.81
8.0.210.0070.00619.83
8.0.200.0070.00419.86
8.0.190.0090.00619.82
8.0.180.0080.00219.85
8.0.170.0070.00820.44
8.0.160.0090.00220.42
8.0.150.0110.00319.81
8.0.140.0110.00519.81
8.0.130.0100.00518.67
8.0.120.0130.00719.84
8.0.110.0050.00619.86
8.0.100.0120.00219.88
8.0.90.0120.00519.88
8.0.80.0090.00919.10
8.0.70.0060.00519.80
8.0.60.0100.00719.81
8.0.50.0130.00519.86
8.0.30.0130.00619.95
8.0.20.0070.01019.08
8.0.10.0080.00819.88
8.0.00.0110.00719.73
7.4.330.0040.00419.39
7.4.320.0150.00319.72
7.4.300.0120.00719.74
7.4.290.0160.00319.67
7.4.280.0130.00819.71
7.4.270.0110.00919.73
7.4.260.0170.00118.62
7.4.250.0120.00619.71
7.4.240.0110.00719.75
7.4.230.0170.00119.65
7.4.220.0090.00718.94
7.4.210.0070.01018.47
7.4.200.0090.00819.68
7.4.190.0160.00921.32
7.4.180.0120.00921.32
7.4.160.0270.00021.32
7.4.150.0220.00321.32
7.4.140.0180.00421.32
7.4.130.0130.00818.92
7.4.120.0180.00519.70
7.4.110.0200.00619.61
7.4.100.0110.01219.72
7.4.90.0150.00819.70
7.4.80.0160.00719.61
7.4.70.0200.00719.70
7.4.60.0170.00819.61
7.4.50.0150.00619.60
7.4.40.0160.00319.69
7.4.30.0140.00519.60
7.4.20.0150.00619.67
7.4.10.0150.00619.64
7.4.00.0130.00619.69
7.3.330.0140.00419.61
7.3.320.0150.00418.61
7.3.310.0180.00219.69
7.3.300.0150.00419.63
7.3.290.0120.00818.36
7.3.280.0170.00721.32
7.3.270.0140.01321.32
7.3.260.0180.00419.65
7.3.250.0230.00321.32
7.3.240.0240.00321.32
7.3.230.0180.00519.61
7.3.220.0150.00719.77
7.3.210.0180.00519.65
7.3.200.0180.00419.69
7.3.190.0130.00919.67
7.3.180.0140.00819.66
7.3.170.0150.00919.70
7.3.160.0150.00719.73
7.3.150.0160.00519.60
7.3.140.0160.00619.67
7.3.130.0130.01019.65
7.3.120.0150.00819.67
7.3.110.0100.01119.69
7.3.100.0180.00419.61
7.3.90.0180.00619.58
7.3.80.0140.00819.62
7.3.70.0130.00819.62
7.3.60.0130.00919.61
7.3.50.0140.00819.69
7.3.40.0190.00419.54
7.3.30.0190.00419.65
7.3.20.0170.00520.07
7.3.10.0170.00420.00
7.3.00.0190.00420.03
7.2.340.0160.00919.65
7.2.330.0180.00619.79
7.2.320.0120.00919.64
7.2.310.0180.00519.75
7.2.300.0170.00519.83
7.2.290.0160.00719.77
7.2.280.0160.00719.78
7.2.270.0200.00419.74
7.2.260.0160.00819.81
7.2.250.0190.00519.63
7.2.240.0200.00419.71
7.2.230.0160.00719.71
7.2.220.0160.00819.65
7.2.210.0140.01019.57
7.2.200.0210.00319.74
7.2.190.0130.00819.72
7.2.180.0150.00719.71
7.2.170.0150.00619.61
7.2.160.0160.00319.68
7.2.150.0170.00620.12
7.2.140.0150.00520.11
7.2.130.0130.00820.22
7.2.120.0190.00220.19
7.2.110.0160.00420.12
7.2.100.0160.00720.12
7.2.90.0160.00520.25
7.2.80.0220.01020.24
7.2.70.0140.00920.18
7.2.60.0130.00820.08
7.2.50.0150.00520.14
7.2.40.0170.00520.19
7.2.30.0160.00420.18
7.2.20.0150.00620.22
7.2.10.0150.00620.19
7.2.00.0140.00720.17

preferences:
120.04 ms | 403 KiB | 5 Q