3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $clbk; public function __construct($b = false) { if($b) { $f = new self(); $this->clbk = function() use ($f) { return $f; }; } } } $f = new Foo(true); var_dump($f->clbk());

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.70.0140.00416.88
8.3.60.0090.00618.52
8.3.50.0150.00321.27
8.3.40.0060.00918.89
8.3.30.0120.00318.76
8.3.20.0060.01220.38
8.3.10.0030.00623.65
8.3.00.0030.00522.31
8.2.180.0180.00318.29
8.2.170.0120.00322.96
8.2.160.0100.01022.08
8.2.150.0060.00925.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00717.50
8.2.110.0050.00520.52
8.2.100.0060.00617.50
8.2.90.0040.00419.21
8.2.80.0030.00717.97
8.2.70.0040.00417.63
8.2.60.0060.00317.93
8.2.50.0000.00818.07
8.2.40.0030.00621.07
8.2.30.0050.00319.80
8.2.20.0050.00317.75
8.2.10.0020.00518.07
8.2.00.0020.00518.12
8.1.280.0100.00725.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.79
8.1.230.0120.00017.42
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0070.00417.48
8.1.190.0050.00317.25
8.1.180.0000.00818.10
8.1.170.0080.00018.27
8.1.160.0000.00822.07
8.1.150.0050.00218.88
8.1.140.0000.00817.33
8.1.130.0050.00217.71
8.1.120.0040.00417.48
8.1.110.0000.00717.36
8.1.100.0070.00017.45
8.1.90.0000.00717.43
8.1.80.0000.00717.48
8.1.70.0080.00017.44
8.1.60.0000.00917.49
8.1.50.0040.00417.54
8.1.40.0040.00417.40
8.1.30.0040.00417.69
8.1.20.0040.00417.56
8.1.10.0040.00417.53
8.1.00.0040.00417.51
8.0.300.0070.00018.77
8.0.290.0000.00816.63
8.0.280.0040.00418.39
8.0.270.0040.00416.83
8.0.260.0040.00417.07
8.0.250.0000.00816.82
8.0.240.0030.00516.96
8.0.230.0000.00916.85
8.0.220.0070.00016.81
8.0.210.0030.00316.90
8.0.200.0030.00316.93
8.0.190.0040.00416.98
8.0.180.0040.00417.00
8.0.170.0000.00916.85
8.0.160.0000.00917.04
8.0.150.0050.00316.82
8.0.140.0040.00416.82
8.0.130.0070.00013.38
8.0.120.0080.00016.95
8.0.110.0000.00816.98
8.0.100.0080.00316.97
8.0.90.0030.00516.86
8.0.80.0110.00417.01
8.0.70.0040.00416.78
8.0.60.0000.00716.81
8.0.50.0040.00416.86
8.0.30.0100.01017.10
8.0.20.0200.01717.40
8.0.10.0000.00816.96
8.0.00.0100.00816.99
7.4.330.0050.00015.14
7.4.320.0030.00316.53
7.4.300.0030.00316.61
7.4.290.0000.00716.41
7.4.280.0050.00516.52
7.4.270.0030.00316.62
7.4.260.0000.00816.63
7.4.250.0040.00416.61
7.4.240.0000.00716.64
7.4.230.0060.00016.44
7.4.220.0130.00716.63
7.4.210.0100.00516.49
7.4.200.0000.00716.64
7.4.160.0060.01016.49
7.4.150.0100.01017.40
7.4.140.0080.01217.86
7.4.130.0140.00916.49
7.4.120.0130.00316.47
7.4.110.0110.00616.49
7.4.100.0110.00716.63
7.4.90.0130.00616.53
7.4.80.0060.01519.39
7.4.70.0070.01016.52
7.4.60.0080.00816.47
7.4.50.0000.00416.43
7.4.40.0120.00616.50
7.4.30.0180.00316.57
7.4.00.0030.01215.01
7.3.330.0030.00313.35
7.3.320.0070.00013.23
7.3.310.0030.00316.42
7.3.300.0000.00716.23
7.3.290.0000.00716.38
7.3.280.0070.00916.36
7.3.270.0140.01017.40
7.3.260.0120.00416.38
7.3.250.0080.01016.57
7.3.240.0030.01316.44
7.3.230.0090.01216.55
7.3.210.0100.00716.62
7.3.200.0110.00919.39
7.3.190.0130.00716.55
7.3.180.0120.00616.63
7.3.170.0060.01116.59
7.3.160.0060.01316.58
7.3.120.0100.00714.50
7.3.110.0070.01314.86
7.3.100.0060.00314.59
7.3.90.0060.00614.91
7.3.80.0040.00814.75
7.3.70.0090.00314.84
7.3.60.0030.01214.64
7.3.50.0070.01014.93
7.3.40.0030.00714.69
7.3.30.0000.01514.63
7.3.20.0120.00316.64
7.3.10.0060.00916.70
7.3.00.0090.00616.60
7.2.330.0060.01016.50
7.2.320.0130.00416.35
7.2.310.0040.01216.74
7.2.300.0140.00716.49
7.2.290.0110.00616.74
7.2.250.0130.00315.21
7.2.240.0120.00914.87
7.2.230.0060.01015.16
7.2.220.0030.00915.15
7.2.210.0030.01015.23
7.2.200.0040.00714.86
7.2.190.0090.00914.88
7.2.180.0070.01114.94
7.2.170.0060.00914.98
7.2.80.0220.00016.37
7.2.60.0070.00716.88
7.2.00.0110.00419.38
7.1.330.0090.00615.66
7.1.320.0040.01115.71
7.1.310.0030.00915.62
7.1.300.0150.00315.39
7.1.290.0060.00915.86
7.1.280.0090.00615.64
7.1.270.0110.00415.39
7.1.260.0030.01215.55
7.1.200.0060.00615.85
7.1.100.0000.01117.89
7.1.70.0130.00016.80
7.1.60.0140.00720.03
7.1.50.0130.01316.97
7.1.00.0070.07322.35
7.0.200.0130.00614.97
7.0.60.0030.05719.93
7.0.50.0030.08317.85
7.0.40.0100.08320.18
7.0.30.0370.05720.19
7.0.20.0200.05720.16
7.0.10.0200.06020.19
7.0.00.0170.08020.12
5.6.280.0030.06320.91
5.6.210.0100.08020.77
5.6.200.0100.08318.25
5.6.190.0070.08320.50
5.6.180.0270.06320.48
5.6.170.0270.06320.56
5.6.160.0030.04020.46
5.6.150.0000.07018.23
5.6.140.0100.06018.29
5.6.130.0030.04718.19
5.6.120.0000.06720.99
5.6.110.0100.08721.00
5.6.100.0100.04720.99
5.6.90.0170.07321.01
5.6.80.0070.08020.52
5.6.70.0170.03320.38
5.5.350.0100.03720.42
5.5.340.0100.07717.98
5.5.330.0200.06720.42
5.5.320.0270.04320.32
5.5.310.0230.05320.27
5.5.300.0070.07318.08
5.5.290.0030.09017.95
5.5.280.0070.04720.69
5.5.270.0070.06720.68
5.5.260.0130.07720.68
5.5.250.0170.07020.61
5.5.240.0030.07320.13
5.4.450.0670.06719.31
5.4.440.0770.08319.45
5.4.430.0670.06319.32
5.4.420.0670.05319.60
5.4.410.0700.05319.07
5.4.400.0630.05719.38
5.4.390.0930.05719.22
5.4.380.0800.06319.26
5.4.370.0870.08019.02
5.4.360.0830.07319.17
5.4.350.0700.06719.01
5.4.340.0870.04019.15
5.4.320.0700.06018.87
5.4.310.0700.04719.15
5.4.300.0630.05319.00
5.4.290.0700.05018.97
5.4.280.0630.05319.15
5.4.270.0630.04719.14
5.4.260.0600.07018.98
5.4.250.0530.06319.23
5.4.240.0670.05319.13
5.4.230.0630.05319.25
5.4.220.0530.06018.97
5.4.210.0670.06019.24
5.4.200.0730.05016.95
5.4.190.0770.04318.99
5.4.180.0700.05019.09
5.4.170.0600.06019.00
5.4.160.0700.06318.93
5.4.150.0730.05718.91
5.4.140.0730.04316.48
5.4.130.0670.05316.38
5.4.120.0830.04316.61
5.4.110.0800.04016.60
5.4.100.0870.07316.34
5.4.90.0670.05316.60
5.4.80.0530.06016.58
5.4.70.0570.06016.74
5.4.60.0070.05316.43
5.4.50.0030.05716.54
5.4.40.0100.07016.48
5.4.30.0200.05316.25
5.4.20.0270.07016.60

preferences:
57.83 ms | 401 KiB | 5 Q