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(){ echo "F!"; }; } } $bla = new Bla; $bla->fn = function($arg="Bu"){return "Hello lo $arg"; }; // can't do in class! echo ($bla->fn)('Wa'); $blah = new Bla(); $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.0110.00716.50
8.3.50.0070.00716.53
8.3.40.0150.00318.70
8.3.30.0120.00318.76
8.3.20.0080.00020.16
8.3.10.0080.00023.48
8.3.00.0040.00421.85
8.2.180.0070.01016.63
8.2.170.0120.00322.96
8.2.160.0000.01420.35
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00020.87
8.2.120.0080.00026.35
8.2.110.0060.00319.14
8.2.100.0040.00818.16
8.2.90.0080.00019.27
8.2.80.0050.00317.97
8.2.70.0060.00317.75
8.2.60.0000.00817.92
8.2.50.0040.00418.09
8.2.40.0040.00420.61
8.2.30.0040.00419.45
8.2.20.0040.00417.63
8.2.10.0040.00417.94
8.2.00.0000.00718.05
8.1.280.0150.00325.92
8.1.270.0100.01022.08
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0060.00322.22
8.1.230.0040.00817.70
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.25
8.1.190.0080.00017.23
8.1.180.0030.00518.10
8.1.170.0040.00418.70
8.1.160.0040.00420.88
8.1.150.0050.00220.67
8.1.140.0030.00519.61
8.1.130.0040.00417.70
8.1.120.0080.00017.46
8.1.110.0000.00717.40
8.1.100.0040.00417.34
8.1.90.0040.00417.46
8.1.80.0040.00417.38
8.1.70.0050.00317.48
8.1.60.0030.00717.56
8.1.50.0000.00817.58
8.1.40.0050.00317.43
8.1.30.0040.00417.67
8.1.20.0060.00317.49
8.1.10.0040.00417.61
8.1.00.0030.00617.41
8.0.300.0030.00518.77
8.0.290.0000.00716.75
8.0.280.0000.00818.40
8.0.270.0070.00017.25
8.0.260.0030.00317.20
8.0.250.0030.00317.05
8.0.240.0000.00716.91
8.0.230.0000.00816.98
8.0.220.0040.00416.97
8.0.210.0030.00316.98
8.0.200.0000.00617.05
8.0.190.0040.00417.02
8.0.180.0040.00416.85
8.0.170.0000.00817.02
8.0.160.0030.00316.86
8.0.150.0040.00416.80
8.0.140.0000.00916.94
8.0.130.0000.00613.34
8.0.120.0030.00516.96
8.0.110.0040.00416.93
8.0.100.0070.00016.98
8.0.90.0040.00417.07
8.0.80.0090.00616.88
8.0.70.0070.00016.97
8.0.60.0070.00016.86
8.0.50.0000.00817.02
8.0.30.0070.01017.24
8.0.20.0100.01017.42
8.0.10.0040.00417.12
8.0.00.0110.00616.75
7.4.330.0050.00016.79
7.4.320.0030.00316.52
7.4.300.0000.00716.50
7.4.290.0070.00016.50
7.4.280.0040.00416.41
7.4.270.0040.00416.65
7.4.260.0040.00416.55
7.4.250.0050.00316.54
7.4.240.0000.00716.40
7.4.230.0000.00716.36
7.4.220.0040.01416.45
7.4.210.0120.00316.62
7.4.200.0000.00716.64
7.4.160.0030.01216.60
7.4.150.0120.00617.40
7.4.140.0080.01117.86
7.4.130.0090.00916.58
7.4.120.0050.01216.46
7.4.110.0090.00916.40
7.4.100.0060.01216.51
7.4.90.0090.00916.77
7.4.80.0030.01319.39
7.4.70.0060.01016.57
7.4.60.0090.00916.64
7.4.50.0080.00416.32
7.4.40.0000.01616.65
7.4.30.0130.01316.49
7.4.00.0030.01314.73
7.3.330.0060.00313.29
7.3.320.0060.00013.20
7.3.310.0030.00516.41
7.3.300.0000.00716.48
7.3.290.0000.00716.43
7.3.280.0110.00716.42
7.3.270.0090.00917.40
7.3.260.0110.00716.46
7.3.250.0090.00816.64
7.3.240.0090.00716.43
7.3.230.0030.01416.39
7.3.210.0090.00916.60
7.3.200.0100.00719.39
7.3.190.0100.00716.50
7.3.180.0120.00316.51
7.3.170.0030.01716.50
7.3.160.0140.00316.58
7.3.120.0040.01114.81
7.3.110.0030.01015.02
7.3.100.0070.00714.94
7.3.90.0070.00715.01
7.3.80.0070.00714.82
7.3.70.0000.01114.89
7.3.60.0040.01214.99
7.3.50.0100.00614.72
7.3.40.0040.01114.69
7.3.30.0090.00614.58
7.3.20.0130.00316.73
7.3.10.0090.00616.69
7.3.00.0030.01016.77
7.2.330.0120.00816.48
7.2.320.0030.02016.48
7.2.310.0120.00616.39
7.2.300.0090.00816.68
7.2.290.0040.01316.43
7.2.240.0090.00315.18
7.2.230.0030.00914.74
7.2.220.0090.00015.16
7.2.210.0070.00714.68
7.2.200.0070.00715.23
7.2.190.0130.00314.89
7.2.180.0040.01115.01
7.2.170.0090.00614.89
7.2.160.0090.00615.11
7.2.150.0040.01216.94
7.2.140.0000.01316.85
7.2.130.0060.00716.97
7.2.120.0070.00817.05
7.2.110.0060.00816.90
7.2.100.0070.00717.10
7.2.90.0100.00517.07
7.2.80.0080.00416.61
7.2.70.0060.00917.03
7.2.60.0040.01017.02
7.2.50.0080.00816.94
7.2.40.0050.00816.95
7.2.30.0050.01016.97
7.2.20.0080.00916.84
7.2.10.0050.00716.96
7.2.00.0020.01217.76
7.1.330.0030.01315.81
7.1.320.0040.00815.82
7.1.310.0060.00315.67
7.1.300.0070.00315.56
7.1.290.0000.01215.88
7.1.280.0000.01015.62
7.1.270.0000.01015.74
7.1.260.0070.00715.73
7.1.250.0060.00815.63
7.1.200.0040.01115.89
7.1.100.0080.00418.09
7.1.70.0040.00417.12
7.1.60.0070.01119.40
7.1.50.0100.01017.09
7.1.00.0100.07022.51
7.0.200.0250.00914.84
7.0.60.0330.07019.97
7.0.50.0100.08017.88
7.0.40.0030.04320.18
7.0.30.0230.08720.20
7.0.20.0400.07320.30
7.0.10.0100.08320.09
7.0.00.0170.07020.09
5.6.280.0070.02721.18
5.6.210.0030.08320.67
5.6.200.0030.06318.16
5.6.190.0100.04020.61
5.6.180.0270.07720.55
5.6.170.0400.05720.54
5.6.160.0030.06020.71
5.6.150.0170.07018.19
5.6.140.0070.03718.18
5.6.130.0070.04318.19
5.6.120.0130.03320.99
5.6.110.0100.08020.96
5.6.100.0100.07321.00
5.6.90.0200.05321.12
5.6.80.0130.05320.39
5.5.350.0100.07020.50
5.5.340.0100.04318.08
5.5.330.0130.08020.29
5.5.320.0530.06320.27
5.5.310.0300.06720.24
5.5.300.0030.04317.98
5.5.290.0100.07717.94
5.5.280.0070.03720.73
5.5.270.0130.04020.64
5.5.260.0070.07020.86
5.5.250.0030.07320.75
5.5.240.4270.03720.24

preferences:
43.34 ms | 400 KiB | 5 Q