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; } $bla = new Bla; $bla->fn = function($arg="Bu"){return "Hello lo $arg"; }; // can't do in class! echo ($bla->fn)('Wa');

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.0120.00318.67
8.3.30.0110.00418.79
8.3.20.0060.00321.72
8.3.10.0050.00321.90
8.3.00.0000.00721.94
8.2.170.0070.00722.96
8.2.160.0070.00720.38
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00020.87
8.2.120.0000.00826.35
8.2.110.0060.00320.38
8.2.100.0090.00317.93
8.2.90.0050.00319.13
8.2.80.0030.00517.97
8.2.70.0000.00917.63
8.2.60.0050.00317.68
8.2.50.0050.00318.09
8.2.40.0030.00520.42
8.2.30.0070.00019.55
8.2.20.0070.00017.66
8.2.10.0040.00418.13
8.2.00.0040.00418.05
8.1.270.0070.01022.14
8.1.260.0090.00028.09
8.1.250.0090.00928.09
8.1.240.0080.00323.90
8.1.230.0040.00717.70
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0040.00418.62
8.1.160.0070.00020.69
8.1.150.0000.00718.77
8.1.140.0080.00019.64
8.1.130.0030.00317.71
8.1.120.0000.00717.38
8.1.110.0000.00717.45
8.1.100.0000.00717.40
8.1.90.0080.00017.52
8.1.80.0070.00317.48
8.1.70.0060.00317.48
8.1.60.0030.00517.64
8.1.50.0030.00517.44
8.1.40.0000.00917.58
8.1.30.0080.00017.55
8.1.20.0030.00617.48
8.1.10.0000.00717.65
8.1.00.0070.00017.43
8.0.300.0050.00218.77
8.0.290.0040.00416.75
8.0.280.0000.00718.38
8.0.270.0070.00017.16
8.0.260.0060.00017.32
8.0.250.0000.00617.00
8.0.240.0000.00816.82
8.0.230.0030.00316.93
8.0.220.0040.00416.91
8.0.210.0050.00216.80
8.0.200.0000.00616.96
8.0.190.0040.00416.83
8.0.180.0000.00716.84
8.0.170.0040.00416.90
8.0.160.0040.00316.79
8.0.150.0000.00716.87
8.0.140.0000.00716.70
8.0.130.0050.00013.30
8.0.120.0040.00416.88
8.0.110.0040.00416.85
8.0.100.0000.00816.88
8.0.90.0000.00716.96
8.0.80.0110.00416.94
8.0.70.0050.00316.72
8.0.60.0070.00016.93
8.0.50.0080.00016.80
8.0.30.0100.01117.09
8.0.20.0130.00817.40
8.0.10.0040.00417.01
8.0.00.0090.00916.66
7.4.330.0020.00216.71
7.4.320.0000.00716.53
7.4.300.0050.00216.49
7.4.290.0070.00016.51
7.4.280.0000.01016.55
7.4.270.0000.00716.45
7.4.260.0040.00416.44
7.4.250.0070.00016.52
7.4.240.0040.00416.61
7.4.230.0000.00716.53
7.4.220.0110.00716.64
7.4.210.0080.00716.59
7.4.200.0030.00316.41
7.4.160.0090.00616.48
7.4.150.0110.00717.40
7.4.140.0110.01017.86
7.4.130.0120.00816.43
7.4.120.0040.01316.50
7.4.110.0130.01016.45
7.4.100.0070.01016.43
7.4.90.0140.00416.45
7.4.80.0120.00619.39
7.4.70.0060.01016.56
7.4.60.0110.00716.41
7.4.50.0070.00716.22
7.4.40.0130.00316.66
7.4.30.0140.00916.36
7.4.00.0030.01414.67
7.3.330.0000.00813.31
7.3.320.0050.00013.26
7.3.310.0030.00316.34
7.3.300.0030.00316.21
7.3.290.0040.00416.18
7.3.280.0090.01016.29
7.3.270.0070.01117.40
7.3.260.0060.01916.61
7.3.250.0060.01316.35
7.3.240.0110.00516.44
7.3.230.0100.01316.40
7.3.210.0140.00316.47
7.3.200.0030.01319.39
7.3.190.0000.01616.69
7.3.180.0090.00616.32
7.3.170.0060.01316.49
7.3.160.0100.00716.54
7.3.10.0140.01416.62
7.3.00.0240.00416.42
7.2.330.0070.01716.55
7.2.320.0120.01216.64
7.2.310.0160.00316.85
7.2.300.0070.01016.43
7.2.290.0120.00616.56
7.2.130.0230.00716.91
7.2.120.0260.00416.65
7.2.110.0270.00217.02
7.2.100.0170.01116.54
7.2.90.0090.01716.75
7.2.80.0140.01116.64
7.2.70.0130.00916.39
7.2.60.0110.01016.88
7.2.50.0170.00516.54
7.2.40.0170.00916.79
7.2.30.0090.01316.49
7.2.20.0140.00616.89
7.2.10.0150.00317.13
7.2.00.0080.01018.06
7.1.250.0160.01015.80
7.1.200.0070.00715.78
7.1.100.0060.00617.93
7.1.70.0030.01017.13
7.1.60.0100.00719.40
7.1.50.0080.00316.91
7.1.00.0070.07322.54
7.0.200.0350.00014.50
7.0.60.0300.08020.01
7.0.50.0000.06317.96
7.0.40.0030.04720.11
7.0.30.0070.05020.16
7.0.20.0500.06320.21
7.0.10.0100.05020.06
7.0.00.0100.08720.23
5.6.280.0030.03321.11
5.6.210.0000.08720.77
5.6.200.0070.03718.15
5.6.190.0070.04020.77
5.6.180.0270.08020.61
5.6.170.0200.04020.58
5.6.160.0030.04720.56
5.6.150.0030.04018.16
5.6.140.0070.08318.12
5.6.130.0070.08318.15
5.6.120.0070.07321.00
5.6.110.0170.06020.99
5.6.100.0170.06721.08
5.6.90.0100.07320.96
5.6.80.0130.06320.29
5.5.350.0200.08020.41
5.5.340.0070.07717.95
5.5.330.0170.07320.31
5.5.320.0230.08020.24
5.5.310.0230.05320.51
5.5.300.0000.04317.94
5.5.290.0030.04317.96
5.5.280.0100.07320.80
5.5.270.0000.08320.81
5.5.260.0170.06320.86
5.5.250.0030.09020.62
5.5.240.4200.04020.27

preferences:
58.18 ms | 400 KiB | 5 Q