3v4l.org

run code in 300+ PHP versions simultaneously
<?php class My_Class { const CLASS_CONSTANT = 'test value'; private function my_function() { $self = $this; $lambda_function = function() use ($self) { echo $self::CLASS_CONSTANT; }; $lambda_function(); } public function start() { $this->my_function(); } } $obj = new My_Class; $obj->start();

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.0140.00718.43
8.3.50.0230.00921.11
8.3.40.0110.00418.58
8.3.30.0140.00719.19
8.3.20.0040.00420.21
8.3.10.0040.00423.67
8.3.00.0050.00319.13
8.2.180.0140.00016.48
8.2.170.0100.01022.96
8.2.160.0110.00420.35
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0060.00620.12
8.2.110.0030.00622.11
8.2.100.0100.00517.50
8.2.90.0000.00719.13
8.2.80.0060.00317.97
8.2.70.0060.00617.38
8.2.60.0070.00317.93
8.2.50.0040.00418.07
8.2.40.0050.00320.07
8.2.30.0050.00317.96
8.2.20.0050.00317.64
8.2.10.0030.00618.12
8.2.00.0040.00417.70
8.1.280.0040.01125.92
8.1.270.0040.00424.01
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0090.00023.92
8.1.230.0040.00717.42
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.25
8.1.190.0030.00517.13
8.1.180.0070.00018.10
8.1.170.0030.00618.42
8.1.160.0000.00722.02
8.1.150.0080.00018.93
8.1.140.0020.00517.51
8.1.130.0080.00017.89
8.1.120.0000.00717.45
8.1.110.0040.00417.44
8.1.100.0070.00017.40
8.1.90.0040.00417.29
8.1.80.0030.00517.54
8.1.70.0040.00417.34
8.1.60.0000.00917.56
8.1.50.0000.00817.39
8.1.40.0030.00617.51
8.1.30.0000.00817.61
8.1.20.0060.00317.58
8.1.10.0040.00417.48
8.1.00.0030.00617.42
8.0.300.0040.00418.77
8.0.290.0030.00616.75
8.0.280.0040.00418.43
8.0.270.0030.00317.24
8.0.260.0000.00617.26
8.0.250.0000.00716.85
8.0.240.0070.00016.88
8.0.230.0030.00316.87
8.0.220.0070.00016.91
8.0.210.0080.00016.95
8.0.200.0040.00416.88
8.0.190.0040.00416.94
8.0.180.0000.00816.92
8.0.170.0060.00316.89
8.0.160.0000.00816.82
8.0.150.0000.00716.70
8.0.140.0080.00016.83
8.0.130.0000.00613.33
8.0.120.0000.00716.75
8.0.110.0020.00516.86
8.0.100.0040.00416.68
8.0.90.0040.00416.72
8.0.80.0100.01416.93
8.0.70.0040.00416.92
8.0.60.0000.00816.95
8.0.50.0050.00216.95
8.0.30.0080.01517.16
8.0.20.0090.01017.40
8.0.10.0000.00816.90
8.0.00.0120.00516.62
7.4.330.0000.00515.02
7.4.320.0030.00316.40
7.4.300.0000.00616.50
7.4.290.0030.00316.57
7.4.280.0050.00316.49
7.4.270.0070.00016.60
7.4.260.0000.00716.57
7.4.250.0070.00016.57
7.4.240.0050.00216.54
7.4.230.0030.00316.61
7.4.220.0070.01316.56
7.4.210.0120.00316.45
7.4.200.0080.00016.57
7.4.160.0080.00816.49
7.4.150.0150.00617.40
7.4.140.0080.01017.86
7.4.130.0120.00516.60
7.4.120.0110.00716.45
7.4.110.0100.01316.48
7.4.100.0030.01416.60
7.4.90.0040.01416.50
7.4.80.0130.00719.39
7.4.70.0110.00816.35
7.4.60.0090.00916.59
7.4.50.0050.00316.43
7.4.40.0140.00716.43
7.4.30.0130.00316.58
7.4.00.0100.00615.14
7.3.330.0030.00313.22
7.3.320.0050.00013.43
7.3.310.0000.00816.25
7.3.300.0030.00316.39
7.3.290.0080.00516.34
7.3.280.0070.00916.34
7.3.270.0030.01417.40
7.3.260.0090.00916.39
7.3.250.0070.01116.37
7.3.240.0070.01416.35
7.3.230.0070.01016.59
7.3.210.0100.00616.20
7.3.200.0120.00919.39
7.3.190.0060.00916.28
7.3.180.0080.00816.58
7.3.170.0090.00916.27
7.3.160.0060.01016.43
7.2.330.0130.00316.91
7.2.320.0060.01216.68
7.2.310.0090.01616.83
7.2.300.0140.00716.70
7.2.290.0090.01516.70
7.2.00.0220.00919.18
7.1.100.0000.01418.04
7.1.70.0000.00817.36
7.1.60.0140.01019.11
7.1.50.0170.01017.00
7.1.00.0130.06722.36
7.0.200.0000.00816.83
7.0.140.0030.07321.98
7.0.60.0170.06721.71
7.0.50.0030.06017.88
7.0.40.0100.08720.10
7.0.30.0170.04020.21
7.0.20.0400.07020.26
7.0.10.0000.05020.13
7.0.00.0170.07320.07
5.6.280.0000.07721.07
5.6.210.0100.05320.51
5.6.200.0070.05318.16
5.6.190.0030.04720.63
5.6.180.0330.07320.53
5.6.170.0500.06320.71
5.6.160.0000.04320.39
5.6.150.0070.08318.14
5.6.140.0070.03718.17
5.6.130.0070.06018.15
5.6.120.0200.06321.00
5.6.110.0130.07021.13
5.6.100.0130.06020.99
5.6.90.0030.08020.98
5.6.80.0070.08020.50
5.5.350.0200.07020.43
5.5.340.0070.04017.95
5.5.330.0000.04320.27
5.5.320.0400.03720.24
5.5.310.0200.04020.38
5.5.300.0070.08018.07
5.5.290.0070.06717.97
5.5.280.0070.08320.88
5.5.270.0070.08320.80
5.5.260.0000.04720.89
5.5.250.0100.07320.59
5.5.240.0200.08320.20
5.4.450.3970.03319.30
5.4.440.2800.04719.59
5.4.430.3600.03319.55
5.4.420.3100.04019.58
5.4.410.3670.04019.46
5.4.400.3470.04019.07
5.4.390.0030.04319.13
5.4.380.2930.04019.04
5.4.370.3730.03719.23
5.4.360.3400.04019.15
5.4.350.4100.03319.21
5.4.340.4130.04319.22
5.4.320.3730.03718.95
5.4.310.3570.04019.17
5.4.300.3900.03019.23
5.4.290.4470.04019.13
5.4.280.3430.04019.10
5.4.270.4000.03718.95
5.4.260.3970.03319.13
5.4.250.3630.03719.21
5.4.240.3730.04019.04
5.4.230.3730.03719.23
5.4.220.4370.03719.14
5.4.210.4130.04319.06
5.4.200.4300.04719.21
5.4.190.3630.03319.12
5.4.180.3830.03719.00
5.4.170.3770.04019.20
5.4.160.3800.04018.95
5.4.150.3700.04019.24
5.4.140.4770.03316.31
5.4.130.3970.03716.45
5.4.120.4100.03016.59
5.4.110.3800.03016.69
5.4.100.4200.03716.57
5.4.90.3900.03716.59
5.4.80.3500.03016.67
5.4.70.3630.02716.29
5.4.60.4630.03016.43
5.4.50.3830.03316.50
5.4.40.3770.03716.33
5.4.30.3900.03716.49
5.4.20.3870.03716.32
5.4.10.3870.03716.49
5.4.00.3500.03315.80
5.3.290.3730.03314.70
5.3.280.4070.03014.67
5.3.270.3900.04314.64
5.3.260.3970.04014.60
5.3.250.4100.03014.77
5.3.240.4330.05314.53
5.3.230.3900.03714.63
5.3.220.4070.03314.73
5.3.210.3870.03714.58
5.3.200.3670.04714.75
5.3.190.3930.04014.58
5.3.180.4000.04014.64
5.3.170.3770.03014.57
5.3.160.3870.04714.59
5.3.150.4000.03714.63
5.3.140.3630.03314.57
5.3.130.3930.04014.60
5.3.120.3930.04014.71
5.3.110.4100.04014.55
5.3.100.4030.03314.03
5.3.90.4270.03314.08
5.3.80.3900.03714.10
5.3.70.3700.03314.07
5.3.60.3970.04013.97
5.3.50.3230.04013.85
5.3.40.3600.04013.86
5.3.30.3700.03313.99
5.3.20.3770.04013.74
5.3.10.3700.03313.82
5.3.00.3370.04013.65
5.2.170.3370.02711.18
5.2.160.3330.02711.18
5.2.150.3230.03711.31
5.2.140.3170.03011.16
5.2.130.2530.03311.05
5.2.120.3100.02311.26
5.2.110.3400.02711.11
5.2.100.2830.02311.05
5.2.90.2870.02710.99
5.2.80.3100.02711.09
5.2.70.3100.02711.05
5.2.60.3100.02710.97
5.2.50.2870.03011.05
5.2.40.1570.02310.96
5.2.30.1970.03010.92
5.2.20.2270.03011.03
5.2.10.2170.03010.82
5.2.00.1730.02310.87
5.1.60.1970.02310.06
5.1.50.2230.0239.96
5.1.40.2400.0309.90
5.1.30.2170.03010.35
5.1.20.1970.02710.37
5.1.10.2200.02310.12
5.1.00.2100.01710.12
5.0.50.1330.0208.52
5.0.40.1470.0238.38
5.0.30.0000.0308.13
5.0.20.0000.0238.26
5.0.10.0000.0278.08
5.0.00.0000.0308.15
4.4.90.1230.0136.75
4.4.80.1230.0136.75
4.4.70.1030.0136.75
4.4.60.1070.0136.75
4.4.50.1000.0206.75
4.4.40.1000.0176.75
4.4.30.0700.0176.75
4.4.20.0970.0176.75
4.4.10.1200.0176.75
4.4.00.1600.0236.75
4.3.110.0600.0236.75
4.3.100.0000.0336.75
4.3.90.0000.0176.75
4.3.80.0030.0236.75
4.3.70.0030.0236.75
4.3.60.0030.0206.75
4.3.50.0000.0336.75
4.3.40.0230.0276.75
4.3.30.0630.0136.75
4.3.20.1200.0076.75
4.3.10.0630.0176.75
4.3.00.0700.0176.75

preferences:
35.79 ms | 400 KiB | 5 Q