3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new StdClass; $obj->fn = function($arg) { return "Hello $arg"; }; echo ($obj->fn)('World'); class Bla { public $fn; public $fn2; public function __construct(){ $this->fn2 = function(){ return "Fu!"; }; } } $bla = new Bla; $bla->fn = function($arg="Bu"){return "Hello lo $arg"; }; // can't do in class! echo ($bla->fn)('Wa'); $blah = new Bla(); echo ($bla->fn2)();

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.0030.01216.88
8.3.50.0110.00821.11
8.3.40.0120.00618.97
8.3.30.0110.00318.84
8.3.20.0040.00420.29
8.3.10.0040.00423.52
8.3.00.0000.00823.61
8.2.180.0110.00416.63
8.2.170.0120.00322.96
8.2.160.0000.01420.35
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0080.00020.86
8.2.120.0000.00726.35
8.2.110.0060.00319.39
8.2.100.0060.00617.93
8.2.90.0000.00819.22
8.2.80.0080.00017.97
8.2.70.0030.00717.63
8.2.60.0050.00317.55
8.2.50.0040.00418.09
8.2.40.0040.00420.42
8.2.30.0020.00519.39
8.2.20.0000.00717.70
8.2.10.0000.00718.05
8.2.00.0050.00317.93
8.1.280.0090.00925.92
8.1.270.0090.00924.01
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0000.01022.18
8.1.230.0070.00417.77
8.1.220.0050.00317.74
8.1.210.0000.00918.77
8.1.200.0090.00017.48
8.1.190.0040.00417.11
8.1.180.0040.00418.10
8.1.170.0040.00418.53
8.1.160.0070.00020.77
8.1.150.0040.00418.92
8.1.140.0050.00319.45
8.1.130.0040.00417.74
8.1.120.0030.00317.43
8.1.110.0030.00317.50
8.1.100.0000.00717.50
8.1.90.0040.00417.41
8.1.80.0050.00217.43
8.1.70.0000.00817.48
8.1.60.0030.00617.51
8.1.50.0030.00517.42
8.1.40.0000.00917.48
8.1.30.0040.00417.63
8.1.20.0030.00517.55
8.1.10.0080.00017.59
8.1.00.0040.00417.44
8.0.300.0030.00618.77
8.0.290.0000.00816.63
8.0.280.0080.00018.42
8.0.270.0000.00717.13
8.0.260.0000.00617.30
8.0.250.0070.00016.94
8.0.240.0000.00716.94
8.0.230.0040.00416.82
8.0.220.0040.00416.76
8.0.210.0000.00716.90
8.0.200.0000.00616.82
8.0.190.0040.00417.01
8.0.180.0080.00016.89
8.0.170.0000.00716.81
8.0.160.0040.00416.80
8.0.150.0040.00416.75
8.0.140.0020.00516.85
8.0.130.0000.00513.25
8.0.120.0060.00316.75
8.0.110.0000.00716.89
8.0.100.0070.00016.79
8.0.90.0030.00516.87
8.0.80.0150.00016.88
8.0.70.0040.00416.77
8.0.60.0000.00716.86
8.0.50.0040.00416.71
8.0.30.0100.00917.05
8.0.20.0090.01017.40
8.0.10.0050.00216.98
8.0.00.0120.00616.85
7.4.330.0020.00216.78
7.4.320.0060.00016.50
7.4.300.0070.00016.45
7.4.290.0030.00416.41
7.4.280.0040.00416.60
7.4.270.0060.00016.58
7.4.260.0040.00413.29
7.4.250.0000.00716.47
7.4.240.0070.00016.50
7.4.230.0040.00416.61
7.4.220.0120.00916.62
7.4.210.0080.00616.58
7.4.200.0070.00016.63
7.4.160.0190.00316.60
7.4.150.0130.00717.40
7.4.140.0120.01217.86
7.4.130.0080.00916.38
7.4.120.0090.00916.39
7.4.110.0060.01216.57
7.4.100.0060.01116.31
7.4.90.0100.01016.46
7.4.80.0130.00719.39
7.4.70.0100.00616.54
7.4.60.0160.00316.41
7.4.50.0070.00716.36
7.4.40.0080.00816.47
7.4.30.0150.00716.75
7.4.00.0000.01514.81
7.3.330.0040.00413.34
7.3.320.0030.00313.31
7.3.310.0030.00316.38
7.3.300.0070.00016.38
7.3.290.0040.00416.36
7.3.280.0070.00816.35
7.3.270.0180.00017.40
7.3.260.0140.00316.41
7.3.250.0130.00716.44
7.3.240.0060.01216.60
7.3.230.0030.01916.40
7.3.210.0100.00616.70
7.3.200.0070.01719.39
7.3.190.0070.01016.54
7.3.180.0100.00716.52
7.3.170.0000.01816.45
7.3.160.0100.00716.68
7.3.120.0040.01414.75
7.3.110.0030.01314.92
7.3.100.0030.01415.00
7.3.90.0100.00614.80
7.3.80.0120.00314.98
7.3.70.0090.00614.87
7.3.60.0100.00714.87
7.3.50.0000.01614.89
7.3.40.0060.00914.91
7.3.30.0000.01314.95
7.3.20.0090.00616.69
7.3.10.0040.00716.69
7.3.00.0060.00616.63
7.2.330.0080.01116.48
7.2.320.0090.01316.41
7.2.310.0060.01216.71
7.2.300.0100.00716.68
7.2.290.0100.00716.51
7.2.240.0060.01215.17
7.2.230.0140.00414.92
7.2.220.0000.01515.25
7.2.210.0030.01214.96
7.2.200.0120.00615.19
7.2.190.0070.01015.24
7.2.180.0090.00315.21
7.2.170.0030.01514.98
7.2.160.0000.01814.80
7.2.150.0070.01117.13
7.2.140.0090.00917.04
7.2.130.0090.00617.03
7.2.120.0000.01217.08
7.2.110.0030.01316.89
7.2.100.0030.01316.89
7.2.90.0090.00316.96
7.2.80.0060.00616.92
7.2.70.0060.00916.80
7.2.60.0000.01416.75
7.2.50.0070.00316.63
7.2.40.0060.00916.98
7.2.30.0070.00316.88
7.2.20.0000.01616.98
7.2.10.0080.00416.75
7.2.00.0040.01118.17
7.1.330.0100.00315.83
7.1.320.0070.01015.81
7.1.310.0100.00715.71
7.1.300.0000.01215.71
7.1.290.0000.01115.86
7.1.280.0060.01115.57
7.1.270.0090.00315.41
7.1.260.0090.00615.33
7.1.250.0040.00715.84
7.1.200.0000.01415.71
7.1.100.0000.01117.87
7.1.70.0000.00816.86
7.1.60.0070.01519.40
7.1.50.0060.01417.05
7.1.00.0000.08022.36
7.0.200.0200.00714.55
7.0.60.0270.08319.96
7.0.50.0070.05017.91
7.0.40.0070.04020.27
7.0.30.0230.07720.24
7.0.20.0230.06020.10
7.0.10.0100.08720.16
7.0.00.0230.06720.12
5.6.280.0000.03321.13
5.6.210.0030.08320.71
5.6.200.0030.08318.19
5.6.190.0130.04020.50
5.6.180.0330.07020.77
5.6.170.0430.05720.47
5.6.160.0030.05320.39
5.6.150.0130.06018.15
5.6.140.0030.07718.15
5.6.130.0130.06018.17
5.6.120.0070.08321.10
5.6.110.0070.08721.05
5.6.100.0170.08021.14
5.6.90.0130.07321.11
5.6.80.0070.07320.40
5.5.350.0170.06320.41
5.5.340.0070.03717.95
5.5.330.0070.04320.13
5.5.320.0470.03720.31
5.5.310.0330.07020.36
5.5.300.0030.04317.94
5.5.290.0130.07717.99
5.5.280.0030.04020.96
5.5.270.0070.07320.80
5.5.260.0000.09020.80
5.5.250.0100.07720.77
5.5.240.4300.03320.15

preferences:
40.28 ms | 401 KiB | 5 Q