3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public $ello = 'ello'; public $c; public $m; function __construct($y){ $this->c = static function($f){ return $f().$this->ello; }; $this->m = function(){ return "h"; }; } } $x = new C("h"); $f = $x->c; echo $f($x->m);

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.00416.75
8.3.50.0040.01116.61
8.3.40.0070.00718.75
8.3.30.0070.00718.84
8.3.20.0040.00420.20
8.3.10.0000.00721.73
8.3.00.0040.00417.91
8.2.180.0170.00318.54
8.2.170.0100.00322.96
8.2.160.0030.01020.52
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00019.30
8.2.120.0040.00426.35
8.2.110.0030.00619.13
8.2.100.0040.00718.03
8.2.90.0000.00819.17
8.2.80.0030.00618.05
8.2.70.0000.00917.63
8.2.60.0060.00317.80
8.2.50.0060.00318.10
8.2.40.0040.00420.59
8.2.30.0080.00020.95
8.2.20.0050.00218.17
8.2.10.0040.00417.97
8.2.00.0000.00717.94
8.1.280.0080.00625.92
8.1.270.0070.00022.07
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00422.55
8.1.230.0080.00317.45
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0000.01017.35
8.1.190.0060.00317.35
8.1.180.0040.00418.10
8.1.170.0000.00918.71
8.1.160.0050.00219.02
8.1.150.0040.00418.89
8.1.140.0030.00519.62
8.1.130.0000.00718.88
8.1.120.0040.00417.48
8.1.110.0040.00417.43
8.1.100.0000.00717.37
8.1.90.0030.00717.36
8.1.80.0030.00317.48
8.1.70.0000.00917.35
8.1.60.0040.00417.49
8.1.50.0070.00017.43
8.1.40.0000.00917.50
8.1.30.0070.00017.63
8.1.20.0000.00817.57
8.1.10.0000.00817.51
8.1.00.0000.00817.48
8.0.300.0000.00718.77
8.0.290.0000.00816.63
8.0.280.0070.00018.30
8.0.270.0000.00717.26
8.0.260.0040.00416.82
8.0.250.0030.00316.87
8.0.240.0000.00717.00
8.0.230.0070.00016.94
8.0.220.0040.00416.86
8.0.210.0030.00316.91
8.0.200.0030.00317.00
8.0.190.0030.00617.01
8.0.180.0060.00317.00
8.0.170.0050.00316.87
8.0.160.0020.00516.91
8.0.150.0000.00716.79
8.0.140.0040.00416.81
8.0.130.0030.00313.43
8.0.120.0000.00816.82
8.0.110.0030.00316.96
8.0.100.0000.00716.94
8.0.90.0030.00516.86
8.0.80.0070.00716.91
8.0.70.0000.00716.84
8.0.60.0040.00416.85
8.0.50.0030.00517.07
8.0.30.0080.00917.16
8.0.20.0080.01117.40
8.0.10.0040.00417.14
8.0.00.0000.01817.05
7.4.330.0060.00015.55
7.4.320.0070.00016.57
7.4.300.0030.00316.41
7.4.290.0070.00316.49
7.4.280.0040.00416.58
7.4.270.0000.00716.51
7.4.260.0060.00013.26
7.4.250.0060.00316.57
7.4.240.0040.00416.52
7.4.230.0040.00416.70
7.4.220.0040.01416.45
7.4.210.0110.00316.69
7.4.200.0030.00316.35
7.4.160.0100.00816.53
7.4.150.0070.01017.40
7.4.140.0100.01317.86
7.4.130.0150.00316.44
7.4.120.0090.00816.61
7.4.110.0070.01016.47
7.4.100.0090.00916.48
7.4.90.0070.01116.68
7.4.80.0190.00419.39
7.4.70.0160.00616.40
7.4.60.0060.01016.41
7.4.50.0030.01216.59
7.4.40.0160.00616.63
7.4.30.0080.00816.48
7.4.10.0070.00715.04
7.4.00.0030.01314.83
7.3.330.0060.00013.26
7.3.320.0060.00013.39
7.3.310.0040.00416.54
7.3.300.0070.00016.30
7.3.290.0100.00616.45
7.3.280.0090.00916.41
7.3.270.0180.01417.40
7.3.260.0060.01116.64
7.3.250.0140.00516.40
7.3.240.0060.01116.34
7.3.230.0150.00316.36
7.3.210.0160.00616.40
7.3.200.0110.01116.49
7.3.190.0030.01216.35
7.3.180.0090.00916.66
7.3.170.0140.00316.44
7.3.160.0000.01716.45
7.3.130.0060.00914.96
7.3.120.0060.01414.84
7.3.110.0130.00614.91
7.3.100.0040.00914.76
7.3.90.0060.00814.96
7.3.80.0060.00914.71
7.3.70.0040.00814.91
7.3.60.0070.00614.77
7.3.50.0070.01014.86
7.3.40.0060.00714.82
7.3.30.0070.00714.85
7.3.20.0080.00416.65
7.3.10.0050.01016.53
7.3.00.0090.00616.51
7.2.330.0100.00716.59
7.2.320.0060.01116.71
7.2.310.0000.01616.61
7.2.300.0100.00716.63
7.2.290.0150.01016.52
7.2.260.0090.00715.02
7.2.250.0090.00914.95
7.2.240.0050.01015.03
7.2.230.0060.01115.16
7.2.220.0100.00415.20
7.2.210.0010.01015.02
7.2.200.0060.00915.02
7.2.190.0080.00714.94
7.2.180.0030.01015.05
7.2.170.0090.00614.99
7.2.160.0070.00614.89
7.2.150.0040.00916.86
7.2.140.0050.01016.90
7.2.130.0040.01216.78
7.2.120.0070.00816.66
7.2.110.0080.00816.75
7.2.100.0040.01216.81
7.2.90.0070.00816.87
7.2.80.0090.00616.94
7.2.70.0050.01016.77
7.2.60.0100.00716.72
7.2.50.0050.01016.77
7.2.40.0090.00716.77
7.2.30.0100.00416.80
7.2.20.0080.00716.78
7.2.10.0090.00616.80
7.2.00.0070.00617.19
7.1.330.0050.00915.70
7.1.320.0070.00515.61
7.1.310.0040.00915.76
7.1.300.0080.00715.80
7.1.290.0040.00715.86
7.1.280.0050.00915.66
7.1.270.0010.01215.60
7.1.260.0050.00615.80
7.1.250.0070.00815.67
7.1.240.0050.00715.69
7.1.230.0050.00915.74
7.1.220.0030.00715.68
7.1.210.0080.00315.68
7.1.200.0050.00515.73
7.1.190.0060.00515.74
7.1.180.0070.00715.72
7.1.170.0070.00715.86
7.1.160.0070.00715.57
7.1.150.0080.00415.80
7.1.140.0070.01015.71
7.1.130.0050.01015.76
7.1.120.0050.00715.95
7.1.110.0020.01215.83
7.1.100.0070.00716.58
7.1.90.0080.00515.68
7.1.80.0050.00815.90
7.1.70.0030.01116.27
7.1.60.0070.00922.17
7.1.50.0120.00622.14
7.1.40.0090.00622.11
7.1.30.0100.00521.93
7.1.20.0070.01121.93
7.1.10.0050.00715.94
7.1.00.0070.00715.98
7.0.330.0020.01015.37
7.0.320.0040.01115.33
7.0.310.0040.00815.43
7.0.300.0050.00915.28
7.0.290.0050.00615.41
7.0.280.0030.00715.36
7.0.270.0110.00215.44
7.0.260.0060.01015.45
7.0.250.0050.00715.47
7.0.240.0090.00415.31
7.0.230.0030.00515.47
7.0.220.0040.00815.45
7.0.210.0050.00815.31
7.0.200.0060.00615.75
7.0.190.0070.00715.77
7.0.180.0070.00415.76
7.0.170.0060.00815.72
7.0.160.0050.00715.76
7.0.150.0020.01115.74
7.0.140.0060.00615.63
7.0.130.0060.00515.78
7.0.120.0060.00715.68
7.0.110.0050.00915.58
7.0.100.0080.00615.52
7.0.90.0070.00715.72
7.0.80.0070.00815.77
7.0.70.0060.00615.70
7.0.60.0070.00415.63
7.0.50.0040.00915.66
7.0.40.0040.00914.49
7.0.30.0040.00714.41
7.0.20.0040.01014.40
7.0.10.0080.00614.50
7.0.00.0070.00614.41
5.6.400.0080.00514.54
5.6.390.0070.01014.54
5.6.380.0030.00814.55
5.6.370.0060.00814.30
5.6.360.0060.00814.28
5.6.350.0040.00914.35
5.6.340.0090.00514.36
5.6.330.0050.00814.40
5.6.320.0090.00614.53
5.6.310.0070.00614.44
5.6.300.0030.00714.48
5.6.290.0050.00814.36
5.6.280.0020.01014.51
5.6.270.0060.00714.37
5.6.260.0090.00414.28
5.6.250.0060.00914.39
5.6.240.0020.01014.25
5.6.230.0040.00914.48
5.6.220.0080.00714.40
5.6.210.0080.00514.23
5.6.200.0090.00514.43
5.6.190.0030.00814.31
5.6.180.0080.00614.53
5.6.170.0070.00614.31
5.6.160.0070.00214.26
5.6.150.0050.00814.38
5.6.140.0040.00814.26
5.6.130.0040.01214.63
5.6.120.0080.00614.56
5.6.110.0070.00514.43
5.6.100.0050.01014.35
5.6.90.0050.01014.10
5.6.80.0070.00814.42
5.6.70.0030.00714.09
5.6.60.0050.00614.37
5.6.50.0060.00614.22
5.6.40.0000.01314.21
5.6.30.0090.00514.23
5.6.20.0070.00714.37
5.6.10.0070.00814.20
5.6.00.0050.00514.09

preferences:
49.01 ms | 400 KiB | 5 Q