3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Animal{ private $name; public function __construct($name){ $this->name = $name; } public function say($say_func=null){ $say_func = is_callable($say_func)? $say_func: function(){ var_dump('default',$this); }; $say_func(); } } $b = function(){ var_dump('custom',$this); }; $a = new Animal('bob'); $a->say(); $a->say($b);

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.0170.00316.88
8.3.50.0090.00921.98
8.3.40.0200.00018.91
8.3.30.0070.00718.88
8.3.20.0070.00020.29
8.3.10.0000.00823.52
8.3.00.0050.00319.51
8.2.180.0130.00618.41
8.2.170.0110.00422.96
8.2.160.0050.00920.44
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0000.01117.50
8.2.120.0060.00326.35
8.2.110.0030.00622.09
8.2.100.0110.00318.16
8.2.90.0040.00419.07
8.2.80.0060.00617.97
8.2.70.0050.00317.63
8.2.60.0050.00317.80
8.2.50.0060.00318.07
8.2.40.0000.00719.34
8.2.30.0030.00320.62
8.2.20.0030.00617.66
8.2.10.0080.00018.05
8.2.00.0070.00018.13
8.1.280.0040.01425.92
8.1.270.0040.00423.83
8.1.260.0080.00028.09
8.1.250.0080.00028.09
8.1.240.0100.00022.23
8.1.230.0060.00619.20
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0030.00617.54
8.1.180.0030.00518.10
8.1.170.0050.00318.46
8.1.160.0020.00522.07
8.1.150.0050.00218.78
8.1.140.0040.00419.57
8.1.130.0050.00217.71
8.1.120.0000.00717.36
8.1.110.0040.00417.33
8.1.100.0040.00417.34
8.1.90.0040.00417.31
8.1.80.0000.00717.45
8.1.70.0000.00717.39
8.1.60.0000.00717.59
8.1.50.0050.00317.46
8.1.40.0000.00817.44
8.1.30.0050.00517.70
8.1.20.0050.00317.54
8.1.10.0000.00817.63
8.1.00.0070.00317.51
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0030.00318.41
8.0.270.0070.00017.20
8.0.260.0030.00317.05
8.0.250.0000.00716.84
8.0.240.0080.00016.84
8.0.230.0040.00416.97
8.0.220.0070.00016.86
8.0.210.0000.00716.77
8.0.200.0030.00317.04
8.0.190.0060.00317.06
8.0.180.0040.00416.96
8.0.170.0030.00516.93
8.0.160.0030.00517.03
8.0.150.0030.00716.88
8.0.140.0030.00616.88
8.0.130.0030.00313.37
8.0.120.0040.00416.90
8.0.110.0070.00016.95
8.0.100.0040.00416.89
8.0.90.0000.00716.96
8.0.80.0060.01516.84
8.0.70.0030.00416.78
8.0.60.0040.00416.75
8.0.50.0000.00816.89
8.0.30.0160.00817.21
8.0.20.0140.01417.43
8.0.10.0000.00716.98
8.0.00.0110.00716.74
7.4.330.0020.00216.77
7.4.320.0040.00416.51
7.4.300.0030.00316.56
7.4.290.0000.00716.52
7.4.280.0060.00316.50
7.4.270.0000.00716.61
7.4.260.0040.00416.54
7.4.250.0030.00616.47
7.4.240.0030.00516.53
7.4.230.0040.00416.68
7.4.220.0140.00716.53
7.4.210.0060.01316.71
7.4.200.0030.00316.30
7.4.160.0130.00316.53
7.4.150.0070.01117.40
7.4.140.0140.00617.86
7.4.130.0080.01016.50
7.4.120.0120.00816.61
7.4.110.0070.01016.40
7.4.100.0000.01816.54
7.4.90.0110.00716.66
7.4.80.0090.01219.39
7.4.70.0070.01316.50
7.4.60.0120.00516.55
7.4.50.0000.01216.65
7.4.40.0130.01016.52
7.4.30.0200.00316.69
7.4.00.0070.00714.93
7.3.330.0000.00513.29
7.3.320.0000.00613.22
7.3.310.0000.00816.38
7.3.300.0000.00716.30
7.3.290.0050.01116.37
7.3.280.0070.01116.31
7.3.270.0150.00417.40
7.3.260.0140.00316.57
7.3.250.0120.00616.44
7.3.240.0100.00816.46
7.3.230.0030.01516.43
7.3.210.0150.00316.51
7.3.200.0100.00716.51
7.3.190.0150.00616.43
7.3.180.0040.01216.46
7.3.170.0080.01316.41
7.3.160.0000.01616.46
7.3.10.0080.01216.44
7.3.00.0040.01316.52
7.2.330.0060.01116.43
7.2.320.0030.01516.57
7.2.310.0090.00616.78
7.2.300.0120.00416.42
7.2.290.0030.01416.71
7.2.130.0020.01316.57
7.2.120.0120.00216.62
7.2.110.0080.00816.88
7.2.100.0060.00716.78
7.2.90.0110.00216.80
7.2.80.0060.00816.79
7.2.70.0090.00516.74
7.2.60.0070.00816.96
7.2.50.0050.01016.90
7.2.40.0050.00716.77
7.2.30.0080.00816.58
7.2.20.0080.00416.91
7.2.10.0080.00416.72
7.2.00.0040.01117.54
7.1.250.0120.00215.71
7.1.200.0050.00515.91
7.1.100.0070.00718.07
7.1.70.0180.00916.77
7.1.60.0090.01319.36
7.1.50.0070.01416.77
7.1.00.0100.07022.31
7.0.200.0060.00316.41
7.0.60.0100.07320.04
7.0.50.0100.07717.88
7.0.40.0170.07320.21
7.0.30.0230.06020.17
7.0.20.0330.07320.22
7.0.10.0100.08320.33
7.0.00.0070.04020.10
5.6.280.0100.02720.89
5.6.210.0030.05320.74
5.6.200.0070.08018.29
5.6.190.0070.09720.61
5.6.180.0300.04020.60
5.6.170.0230.07720.47
5.6.160.0100.05020.50
5.6.150.0070.06318.19
5.6.140.0030.04018.19
5.6.130.0000.05018.15
5.6.120.0000.05321.00
5.6.110.0070.04021.14
5.6.100.0100.08020.90
5.6.90.0100.04721.09
5.6.80.0070.06020.52
5.5.350.0200.08320.50
5.5.340.0030.04017.93
5.5.330.0070.07720.47
5.5.320.0000.04020.39
5.5.310.0370.06720.36
5.5.300.0070.04018.08
5.5.290.0030.05017.94
5.5.280.0070.07720.70
5.5.270.0000.04720.87
5.5.260.0170.08020.88
5.5.250.0070.06720.70
5.5.240.0300.05320.20

preferences:
50.1 ms | 401 KiB | 5 Q