3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function fooMethod() { if (isset($this)) { echo get_class($this); } else { echo "no \$this"; } $class = __CLASS__; if ($this instanceof $class) { echo "instance of $class"; } else { echo "not instance of $class"; } } } class Bar { function barMethod() { Foo::fooMethod(); } } $bar = new Bar; $bar->barMethod();

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.88
8.3.50.0130.00521.14
8.3.40.0070.00718.71
8.3.30.0070.00718.79
8.3.20.0070.00020.16
8.3.10.0030.00523.66
8.3.00.0050.00318.00
8.2.180.0130.00318.62
8.2.170.0090.00622.96
8.2.160.0070.00720.39
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0090.00017.38
8.2.110.0030.00622.25
8.2.100.0080.00417.84
8.2.90.0040.00417.63
8.2.80.0040.00418.97
8.2.70.0000.00817.50
8.2.60.0080.00017.63
8.2.50.0080.00018.07
8.2.40.0040.00421.16
8.2.30.0060.00320.67
8.2.20.0030.00617.71
8.2.10.0070.00017.87
8.2.00.0000.00817.87
8.1.280.0170.00325.92
8.1.270.0190.00023.89
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00423.72
8.1.230.0040.00818.94
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0040.00417.23
8.1.190.0000.00817.10
8.1.180.0060.00318.10
8.1.170.0040.00418.37
8.1.160.0000.00721.96
8.1.150.0070.00018.83
8.1.140.0030.00619.09
8.1.130.0040.00417.68
8.1.120.0040.00417.38
8.1.110.0000.01017.32
8.1.100.0070.00017.36
8.1.90.0000.00717.28
8.1.80.0080.00017.28
8.1.70.0000.00717.33
8.1.60.0000.00817.64
8.1.50.0040.00417.50
8.1.40.0050.00317.38
8.1.30.0080.00017.52
8.1.20.0040.00417.64
8.1.10.0030.00517.53
8.1.00.0000.01117.39
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0100.00018.30
8.0.270.0000.00717.21
8.0.260.0070.00017.20
8.0.250.0040.00416.95
8.0.240.0000.00716.95
8.0.230.0000.00717.00
8.0.220.0000.00716.79
8.0.210.0030.00316.77
8.0.200.0030.00316.85
8.0.190.0040.00416.85
8.0.180.0000.00716.94
8.0.170.0000.00716.92
8.0.160.0000.00816.80
8.0.150.0030.00316.73
8.0.140.0040.00416.89
8.0.130.0000.00713.33
8.0.120.0040.00416.74
8.0.110.0040.00416.81
8.0.100.0070.00016.75
8.0.90.0030.00316.93
8.0.80.0100.00616.85
8.0.70.0050.00216.81
8.0.60.0000.00716.91
8.0.50.0000.00816.92
8.0.30.0090.00917.07
8.0.20.0110.01117.40
8.0.10.0000.00717.02
8.0.00.0120.00716.68
7.4.330.0050.00015.08
7.4.320.0000.00616.55
7.4.300.0060.00016.63
7.4.290.0030.00316.61
7.4.280.0070.00016.52
7.4.270.0080.00016.64
7.4.260.0000.00716.58
7.4.250.0000.00716.49
7.4.240.0030.00516.48
7.4.230.0040.00416.58
7.4.220.0190.00716.55
7.4.210.0130.00316.63
7.4.200.0000.00716.61
7.4.160.0090.00916.70
7.4.150.0030.01417.40
7.4.140.0070.01217.86
7.4.130.0120.00816.54
7.4.120.0090.00916.57
7.4.110.0060.01416.35
7.4.100.0160.00716.43
7.4.90.0140.00416.41
7.4.80.0110.00619.39
7.4.70.0110.01116.49
7.4.60.0100.00716.43
7.4.50.0000.00816.21
7.4.40.0100.00716.62
7.4.30.0090.01216.69
7.4.00.0070.00914.85
7.3.330.0030.00313.42
7.3.320.0000.00613.16
7.3.310.0070.00016.41
7.3.300.0000.00716.39
7.3.290.0070.00716.34
7.3.280.0100.00816.39
7.3.270.0120.00617.40
7.3.260.0090.00916.29
7.3.250.0080.00916.42
7.3.240.0120.00916.51
7.3.230.0100.01016.41
7.3.210.0110.00616.32
7.3.200.0090.00616.39
7.3.190.0000.01716.63
7.3.180.0090.00616.51
7.3.170.0060.01216.32
7.3.160.0100.00916.36
7.3.120.0060.01314.70
7.3.110.0070.00714.93
7.3.100.0070.01014.74
7.3.90.0120.00314.68
7.3.80.0040.00814.65
7.3.70.0080.00314.86
7.3.60.0040.01114.82
7.3.50.0030.01314.84
7.3.40.0090.00614.90
7.3.30.0000.01414.98
7.3.20.0000.01316.38
7.3.10.0090.00616.36
7.3.00.0060.00316.56
7.2.330.0080.01216.73
7.2.320.0170.01116.68
7.2.310.0060.01116.41
7.2.300.0070.01316.70
7.2.290.0150.00316.73
7.2.250.0060.01215.16
7.2.240.0080.01115.07
7.2.230.0060.00914.70
7.2.220.0040.00915.04
7.2.210.0040.01014.93
7.2.200.0070.00715.11
7.2.190.0090.00915.07
7.2.180.0060.00914.95
7.2.170.0030.00715.04
7.2.60.0000.01317.03
7.2.00.0070.01019.48
7.1.330.0090.00315.63
7.1.320.0060.00615.78
7.1.310.0060.00315.89
7.1.300.0060.00915.74
7.1.290.0030.00815.63
7.1.280.0060.00915.70
7.1.270.0080.00415.54
7.1.260.0090.00615.72
7.1.200.0080.00415.70
7.1.100.0040.00818.04
7.1.70.0050.00517.07
7.1.60.0110.01119.50
7.1.50.0090.00916.86
7.1.00.0030.07722.45
7.0.200.0700.00714.76
7.0.60.0000.07719.95
7.0.50.0100.08017.83
7.0.40.0070.05720.15
7.0.30.0230.03320.25
7.0.20.0170.05320.06
7.0.10.0070.09020.19
7.0.00.0030.09020.22
5.6.280.0100.03721.11
5.6.210.0070.03720.75
5.6.200.0030.07318.25
5.6.190.0030.06020.57
5.6.180.0300.04320.51
5.6.170.0200.03720.56
5.6.160.0100.03320.50
5.6.150.0070.05718.11
5.6.140.0070.06318.19
5.6.130.0030.09018.13
5.6.120.0030.05320.88
5.6.110.0030.08721.02
5.6.100.0000.04721.00
5.6.90.0100.08720.95
5.6.80.0070.08320.51
5.5.350.0030.04020.47
5.5.340.0070.07318.07
5.5.330.0070.07320.35
5.5.320.4100.04320.32
5.5.310.0330.08020.19
5.5.300.0070.08018.09
5.5.290.0000.05017.93
5.5.280.0130.04020.78
5.5.270.0100.07720.64
5.5.260.0000.05320.64
5.5.250.0070.06020.48
5.5.240.0000.08020.37
5.4.450.0900.06019.56
5.4.440.0770.06319.58
5.4.430.0700.05719.31
5.4.420.0700.05319.48
5.4.410.0700.05719.50
5.4.400.0770.04719.02
5.4.390.0700.05318.83
5.4.380.0800.06719.05
5.4.370.0830.05319.25
5.4.360.0770.05019.14
5.4.350.0670.06019.26
5.4.340.0830.05319.14
5.4.320.0870.05719.15
5.4.310.0800.04719.32
5.4.300.0770.05019.00
5.4.290.0800.05019.05
5.4.280.0700.06018.87
5.4.270.0800.05019.15
5.4.260.0670.06019.28
5.4.250.0700.05318.98
5.4.240.0770.04319.25
5.4.230.0670.05719.21
5.4.220.0730.05019.02
5.4.210.0700.05319.00
5.4.200.0770.05318.97
5.4.190.0830.04318.83
5.4.180.0770.05019.25
5.4.170.0630.06319.13
5.4.160.0730.05018.99
5.4.150.0830.04719.27
5.4.140.0700.05316.52
5.4.130.0870.03016.55
5.4.120.0630.06016.46
5.4.110.0330.05316.67
5.4.100.0170.04316.24
5.4.90.0070.06716.70
5.4.80.0070.06716.23
5.4.70.0300.07016.55
5.4.60.0030.07016.53
5.4.50.0000.03716.55
5.4.40.0170.03716.43
5.4.30.0230.06316.33
5.4.20.0000.05016.34

preferences:
58.13 ms | 401 KiB | 5 Q