3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Token { public $fix = null; // this would be a function pointer in c++ // ctr public function Token($MyFix) { $this->fix = $MyFix; } } //Create a class $AFix = function(){ return 'foo'; }; $token = new Token($AFix) ; // call echo $token->fix();

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.0080.00818.30
8.3.50.0140.00316.49
8.3.40.0070.01118.87
8.3.30.0090.00618.84
8.3.20.0050.00221.94
8.3.10.0080.00021.77
8.3.00.0060.00319.13
8.2.180.0120.00318.29
8.2.170.0070.01422.96
8.2.160.0070.00722.25
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0070.00022.26
8.2.120.0040.00426.35
8.2.110.0030.00619.31
8.2.100.0000.01117.84
8.2.90.0050.00319.10
8.2.80.0080.00017.97
8.2.70.0050.00317.63
8.2.60.0000.00917.93
8.2.50.0060.00318.10
8.2.40.0000.00720.46
8.2.30.0040.00419.13
8.2.20.0040.00417.95
8.2.10.0040.00418.13
8.2.00.0060.00318.07
8.1.280.0140.00725.92
8.1.270.0040.00423.70
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00321.36
8.1.230.0030.00718.97
8.1.220.0000.00717.74
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0030.00617.48
8.1.180.0040.00418.10
8.1.170.0050.00318.59
8.1.160.0040.00418.86
8.1.150.0040.00420.14
8.1.140.0070.00019.58
8.1.130.0030.00318.77
8.1.120.0040.00417.50
8.1.110.0050.00217.50
8.1.100.0000.00817.32
8.1.90.0000.00817.39
8.1.80.0040.00417.47
8.1.70.0000.00717.49
8.1.60.0000.00817.61
8.1.50.0060.00317.59
8.1.40.0000.00817.48
8.1.30.0050.00317.65
8.1.20.0040.00417.69
8.1.10.0030.00517.56
8.1.00.0020.00517.56
8.0.300.0070.00020.06
8.0.290.0070.00016.63
8.0.280.0040.00418.39
8.0.270.0050.00217.16
8.0.260.0000.00616.74
8.0.250.0030.00316.85
8.0.240.0060.00316.85
8.0.230.0090.00016.86
8.0.220.0100.00016.81
8.0.210.0040.00416.84
8.0.200.0030.00316.91
8.0.190.0000.00817.04
8.0.180.0000.00717.05
8.0.170.0000.00717.07
8.0.160.0080.00016.92
8.0.150.0040.00416.97
8.0.140.0050.00316.82
8.0.130.0030.00313.34
8.0.120.0050.00316.77
8.0.110.0040.00416.83
8.0.100.0050.00217.03
8.0.90.0050.00217.09
8.0.80.0060.00916.88
8.0.70.0000.00717.01
8.0.60.0040.00416.82
8.0.50.0000.00716.96
8.0.30.0090.01117.12
8.0.20.0100.01117.40
8.0.10.0040.00417.05
8.0.00.0120.00616.69
7.4.330.0050.00015.55
7.4.320.0060.00016.55
7.4.300.0030.00316.61
7.4.290.0000.00716.42
7.4.280.0080.00016.61
7.4.270.0000.00716.46
7.4.260.0050.00013.31
7.4.250.0000.00716.58
7.4.240.0070.00016.62
7.4.230.0000.00716.69
7.4.220.0040.01516.70
7.4.210.0110.00416.52
7.4.200.0040.00416.55
7.4.160.0060.00916.58
7.4.150.0110.00617.40
7.4.140.0090.01417.86
7.4.130.0110.00716.68
7.4.120.0140.00816.61
7.4.110.0100.01416.51
7.4.100.0060.01216.59
7.4.90.0070.01016.64
7.4.80.0070.01719.39
7.4.70.0030.01316.64
7.4.60.0080.00816.43
7.4.50.0040.01516.72
7.4.40.0130.00316.49
7.4.30.0100.00716.66
7.4.00.0070.01015.03
7.3.330.0030.00313.23
7.3.320.0050.00013.19
7.3.310.0030.00316.39
7.3.300.0000.00716.33
7.3.290.0080.00716.36
7.3.280.0080.00816.36
7.3.270.0090.00917.40
7.3.260.0070.01016.47
7.3.250.0150.00516.47
7.3.240.0080.00916.53
7.3.230.0120.00616.43
7.3.210.0060.01116.40
7.3.200.0080.00816.59
7.3.190.0120.00416.37
7.3.180.0050.01416.47
7.3.170.0030.01316.48
7.3.160.0100.00716.28
7.3.120.0030.01414.60
7.3.110.0030.00914.84
7.3.100.0070.00714.82
7.3.90.0000.00914.94
7.3.80.0000.01414.96
7.3.70.0070.00714.75
7.3.60.0040.00414.97
7.3.50.0090.00914.63
7.3.40.0030.01415.03
7.3.30.0060.00314.69
7.3.20.0060.00916.52
7.3.10.0090.00516.42
7.3.00.0050.00516.64
7.2.330.0120.00616.65
7.2.320.0100.01316.37
7.2.310.0060.01116.74
7.2.300.0090.00916.43
7.2.290.0030.02016.49
7.2.250.0170.00315.18
7.2.240.0030.01715.10
7.2.230.0070.00715.01
7.2.220.0090.00614.98
7.2.210.0030.01215.02
7.2.200.0140.00015.14
7.2.190.0040.00814.65
7.2.180.0000.01714.88
7.2.170.0000.01415.02
7.2.130.0060.01016.98
7.2.120.0060.00916.98
7.2.110.0030.00917.00
7.2.100.0070.00716.65
7.2.90.0060.00616.86
7.2.80.0030.01216.82
7.2.70.0030.01316.86
7.2.60.0070.00816.97
7.2.50.0060.00716.94
7.2.40.0070.00717.02
7.2.30.0030.00916.98
7.2.20.0080.00317.04
7.2.10.0100.00716.80
7.2.00.0030.00918.22
7.1.330.0090.00315.87
7.1.320.0040.01215.90
7.1.310.0120.00315.74
7.1.300.0100.00315.59
7.1.290.0040.01115.62
7.1.280.0070.00715.70
7.1.270.0150.00015.51
7.1.260.0000.01515.62
7.1.250.0040.01115.94
7.1.200.0070.00715.70
7.1.70.0100.00017.28
7.1.60.0900.00732.97
7.1.50.0670.01332.93
7.1.40.0600.01732.65
7.1.30.0730.02032.84
7.1.20.0730.01732.46
7.1.10.0500.01014.71
7.1.00.0430.01014.80
7.0.200.0700.00714.82
7.0.190.0600.01314.87
7.0.180.0530.01014.26
7.0.170.0670.00314.46
7.0.160.0500.01014.47
7.0.150.0630.00714.46
7.0.140.0600.00714.56
7.0.130.0500.01014.77
7.0.120.0530.01014.79
7.0.110.0530.00314.57
7.0.100.0500.00314.50
7.0.90.0470.01314.41
7.0.80.0570.01014.45
7.0.70.0600.01314.55
7.0.60.0570.00714.09
7.0.50.0500.01314.58
7.0.40.0430.01014.60
7.0.30.0430.00714.51
7.0.20.0570.01314.63
7.0.10.0900.00714.63
7.0.00.0900.01014.46

preferences:
56.28 ms | 401 KiB | 5 Q