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.0120.00918.68
8.3.50.0100.00716.48
8.3.40.0120.00318.97
8.3.30.0090.01218.89
8.3.20.0070.00021.87
8.3.10.0060.00321.63
8.3.00.0000.00819.05
8.2.180.0090.00618.41
8.2.170.0000.01522.96
8.2.160.0100.00322.27
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0040.00420.16
8.2.120.0080.00026.35
8.2.110.0040.00422.11
8.2.100.0040.00817.84
8.2.90.0040.00419.22
8.2.80.0040.00417.97
8.2.70.0040.00417.61
8.2.60.0070.00418.04
8.2.50.0000.00818.10
8.2.40.0040.00420.65
8.2.30.0000.00819.33
8.2.20.0000.00718.13
8.2.10.0030.00618.02
8.2.00.0050.00317.97
8.1.280.0060.00925.92
8.1.270.0060.00323.82
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0000.00923.96
8.1.230.0070.00322.20
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0050.00317.13
8.1.180.0070.00018.10
8.1.170.0000.00718.37
8.1.160.0050.00218.88
8.1.150.0070.00020.08
8.1.140.0050.00319.58
8.1.130.0000.00718.89
8.1.120.0040.00417.48
8.1.110.0050.00217.34
8.1.100.0040.00417.47
8.1.90.0000.00817.46
8.1.80.0000.00717.38
8.1.70.0030.00517.46
8.1.60.0040.00417.47
8.1.50.0040.00417.54
8.1.40.0040.00417.39
8.1.30.0040.00417.65
8.1.20.0040.00417.65
8.1.10.0000.00817.55
8.1.00.0060.00317.54
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.37
8.0.270.0000.00717.26
8.0.260.0050.00316.76
8.0.250.0000.00716.94
8.0.240.0000.00817.02
8.0.230.0090.00016.91
8.0.220.0000.00916.93
8.0.210.0040.00416.97
8.0.200.0070.00017.08
8.0.190.0030.00516.89
8.0.180.0040.00416.89
8.0.170.0000.00716.91
8.0.160.0000.00817.06
8.0.150.0060.00316.80
8.0.140.0000.00716.82
8.0.130.0070.00013.32
8.0.120.0040.00416.83
8.0.110.0030.00316.95
8.0.100.0040.00416.91
8.0.90.0030.00316.86
8.0.80.0100.00616.99
8.0.70.0000.00816.81
8.0.60.0000.00716.92
8.0.50.0070.00016.97
8.0.30.0110.01016.99
8.0.20.0090.01217.40
8.0.10.0000.00717.09
8.0.00.0140.00416.77
7.4.330.0000.00515.55
7.4.320.0030.00316.46
7.4.300.0040.00416.63
7.4.290.0000.00716.46
7.4.280.0040.00416.50
7.4.270.0000.00716.59
7.4.260.0030.00313.30
7.4.250.0000.00716.43
7.4.240.0030.00316.62
7.4.230.0030.00316.45
7.4.220.0130.01016.45
7.4.210.0110.00616.46
7.4.200.0050.00316.61
7.4.160.0040.01116.55
7.4.150.0160.00317.40
7.4.140.0110.01117.86
7.4.130.0120.00616.59
7.4.120.0100.01016.58
7.4.110.0060.01216.72
7.4.100.0090.00916.44
7.4.90.0060.01116.46
7.4.80.0110.00619.39
7.4.70.0100.00716.66
7.4.60.0040.01216.36
7.4.50.0070.00716.32
7.4.40.0220.00016.41
7.4.30.0060.01016.52
7.4.00.0090.00514.81
7.3.330.0060.00013.44
7.3.320.0050.00013.18
7.3.310.0070.00016.36
7.3.300.0000.00616.23
7.3.290.0090.00716.37
7.3.280.0120.00616.35
7.3.270.0110.00717.40
7.3.260.0120.00916.41
7.3.250.0100.00816.34
7.3.240.0100.01016.52
7.3.230.0140.00316.48
7.3.210.0060.01216.43
7.3.200.0030.01316.44
7.3.190.0120.00416.35
7.3.180.0080.00816.43
7.3.170.0090.00616.28
7.3.160.0000.02016.64
7.3.120.0090.00914.86
7.3.110.0040.00814.84
7.3.100.0000.01514.74
7.3.90.0000.01114.84
7.3.80.0090.00614.70
7.3.70.0070.01014.52
7.3.60.0090.00614.59
7.3.50.0030.01014.82
7.3.40.0040.00714.62
7.3.30.0000.01214.39
7.3.20.0080.00416.78
7.3.10.0090.00616.57
7.3.00.0100.00316.68
7.2.330.0140.00316.70
7.2.320.0130.00716.61
7.2.310.0040.01316.68
7.2.300.0070.01016.68
7.2.290.0000.02116.57
7.2.250.0070.01315.26
7.2.240.0070.01114.85
7.2.230.0030.01315.28
7.2.220.0040.01115.21
7.2.210.0140.00315.21
7.2.200.0000.01015.31
7.2.190.0040.01214.98
7.2.180.0040.01114.79
7.2.170.0060.00314.94
7.2.60.0040.00917.04
7.1.330.0070.00716.04
7.1.320.0030.01015.69
7.1.310.0040.01415.63
7.1.300.0040.01115.71
7.1.290.0090.00615.94
7.1.280.0030.00715.81
7.1.270.0070.01015.77
7.1.260.0100.00615.49
7.1.200.0100.00715.90
7.1.70.0020.00516.95
7.1.60.0670.02033.28
7.1.50.0570.00733.00
7.1.40.0700.01732.58
7.1.30.0200.01032.61
7.1.20.0370.02032.71
7.1.10.0600.01314.49
7.1.00.0600.00714.72
7.0.200.0770.01014.76
7.0.190.0900.00315.03
7.0.180.0070.00714.39
7.0.170.0170.01714.46
7.0.160.0270.01014.52
7.0.150.0670.01314.71
7.0.140.0530.01014.61
7.0.130.0630.00014.82
7.0.120.0570.01314.70
7.0.110.0770.01014.52
7.0.100.0770.01014.55
7.0.90.0070.01014.24
7.0.80.0500.00314.70
7.0.70.0800.01314.52
7.0.60.0170.00714.33
7.0.50.0570.01014.55
7.0.40.0070.01314.67
7.0.30.0500.01714.39
7.0.20.1000.00714.61
7.0.10.0970.01014.32
7.0.00.0770.00714.77

preferences:
57.67 ms | 400 KiB | 5 Q