3v4l.org

run code in 300+ PHP versions simultaneously
<?php unset($this); class Foo{ private static $this; protected $a = true; public function __construct(){ self::$this = new Foo(); echo "From Foo()"; } public static function init(){ //var_dump(new Foo); //var_dump(self::$this); echo "From Foo::init()"; } public function test(){ echo "called from static"; } } Foo::init();

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.0130.00616.75
8.3.50.0120.01022.85
8.3.40.0120.00918.67
8.3.30.0070.00718.74
8.3.20.0040.00420.34
8.3.10.0050.00323.66
8.3.00.0030.00619.26
8.2.180.0060.01216.75
8.2.170.0100.01022.96
8.2.160.0000.01618.71
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.06
8.2.110.0040.00719.23
8.1.280.0140.00725.92
8.1.270.0040.00422.00
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0060.00318.82
7.4.10.0160.01316.47
7.4.00.0090.00915.29
7.3.130.0160.00916.14
7.3.120.0160.00315.42
7.3.110.0180.00515.38
7.3.100.0110.01015.38
7.3.90.0090.01315.42
7.3.80.0120.01015.45
7.3.70.0140.00515.44
7.3.60.0150.00715.34
7.3.50.0130.00415.45
7.3.40.0100.00415.29
7.3.30.0150.00415.37
7.3.20.0110.01316.23
7.3.10.0060.01116.31
7.3.00.0150.00816.39
7.2.260.0140.01416.57
7.2.250.0110.01215.37
7.2.240.0110.01215.60
7.2.230.0100.01015.64
7.2.220.0080.01415.51
7.2.210.0050.01715.57
7.2.200.0140.00515.42
7.2.190.0070.01315.41
7.2.180.0140.00815.55
7.2.170.0090.00915.62
7.2.160.0160.01016.28
7.2.150.0130.02016.18
7.2.140.0220.01316.27
7.2.130.0170.01116.34
7.2.120.0150.00916.41
7.2.110.0140.01016.33
7.2.100.0220.00516.60
7.2.90.0160.00314.01
7.2.80.0140.01016.41
7.2.70.0140.00814.16
7.2.60.0130.00916.43
7.2.50.0200.00816.54
7.2.40.0220.00816.47
7.2.30.0070.01516.59
7.2.20.0220.00816.46
7.2.10.0190.01016.52
7.2.00.0220.01117.40
7.1.330.3100.00715.41
7.1.320.0350.01315.46
7.1.310.0420.00615.45
7.1.300.0910.00815.40
7.1.290.0080.01415.33
7.1.280.0140.00515.24
7.1.270.0140.00715.31
7.1.260.0110.01315.23
7.1.250.0210.00315.35
7.1.240.0370.00915.27
7.1.230.0640.00915.30
7.1.220.0170.01115.37
7.1.210.0310.00315.21
7.1.200.0120.00613.44
7.1.190.0420.00011.65
7.1.180.2150.00011.65
7.1.170.0230.00715.16
7.1.160.1050.01015.31
7.1.150.0240.01215.21
7.1.140.0520.01015.33
7.1.130.0210.00815.17
7.1.120.0180.01315.21
7.1.110.0190.00615.34
7.1.100.0180.00316.45
7.1.90.0170.01215.34
7.1.80.0240.01215.16
7.1.70.0100.01216.03
7.1.60.0320.00617.38
7.1.50.0160.00916.14
7.1.40.0170.01315.18
7.1.30.0200.00415.29
7.1.20.0220.00915.24
7.1.10.0290.00715.16
7.1.00.0140.04118.77
7.0.330.0190.00615.07
7.0.320.0090.01815.04
7.0.310.0140.01914.96
7.0.300.0210.01615.06
7.0.290.0430.00714.94
7.0.280.0240.01115.19
7.0.270.0090.01415.12
7.0.260.0200.01215.10
7.0.250.0220.00715.13
7.0.240.0230.00311.65
7.0.230.0160.01915.16
7.0.220.0390.00915.29
7.0.210.0380.01815.07
7.0.200.0100.00816.04
7.0.190.0330.00611.65
7.0.180.0250.00915.21
7.0.170.0750.01015.25
7.0.160.1810.00615.04
7.0.150.0190.00915.20
7.0.140.0100.04518.60
7.0.130.0230.00914.98
7.0.120.0280.00615.29
7.0.110.0260.00615.16
7.0.100.0160.01915.08
7.0.90.0310.00715.29
7.0.80.0400.01215.30
7.0.70.0190.01215.10
7.0.60.0370.04317.59
7.0.50.0420.04616.49
7.0.40.0130.04415.93
7.0.30.0330.03317.53
7.0.20.0280.04117.54
7.0.10.0120.04717.53
7.0.00.0120.03617.49
5.6.400.0050.02015.75
5.6.390.0210.00816.04
5.6.380.0120.01415.54
5.6.370.0140.01415.63
5.6.360.0170.01015.95
5.6.350.0080.01315.71
5.6.340.0230.00311.65
5.6.330.0130.00011.65
5.6.320.0100.01011.65
5.6.310.0180.00815.67
5.6.300.0180.01215.69
5.6.290.0100.01515.84
5.6.280.0160.03918.28
5.6.270.0170.01015.84
5.6.260.0190.00715.71
5.6.250.0090.00911.65
5.6.240.0120.01215.73
5.6.230.0170.00815.88
5.6.220.0130.01015.89
5.6.210.0130.02618.15
5.6.200.0100.03516.97
5.6.190.0120.02718.27
5.6.180.0200.03418.08
5.6.170.0230.04018.12
5.6.160.0110.04418.06
5.6.150.0150.04717.01
5.6.140.0100.04314.91
5.6.130.0140.03916.99
5.6.120.0100.04918.53
5.6.110.0120.04618.41
5.6.100.0130.03818.54
5.6.90.0140.03516.34
5.6.80.0090.02818.00
5.6.70.0130.01015.68
5.6.60.0090.00911.65
5.6.50.0100.01515.77
5.6.40.0140.00815.57
5.6.30.0140.00715.80
5.6.20.0100.01015.62
5.6.10.0170.00615.80
5.6.00.0070.01415.66
5.5.380.0230.00415.50
5.5.370.0170.00615.97
5.5.360.0150.01115.70
5.5.350.0280.04018.04
5.5.340.0220.02716.78
5.5.330.0140.02118.04
5.5.320.0210.04618.09
5.5.310.0300.03718.08
5.5.300.0190.02916.96
5.5.290.0070.03716.75
5.5.280.0110.02218.28
5.5.270.0130.04718.23
5.5.260.0150.04318.12
5.5.250.0060.05318.17
5.5.240.0200.03717.86
5.5.230.0100.01315.50
5.5.220.0130.00915.68
5.5.210.0130.00915.52
5.5.200.0080.01715.54
5.5.190.0170.00815.40
5.5.180.0130.01115.78
5.5.170.0150.00615.46
5.5.160.0000.02015.58
5.5.150.0100.01015.70
5.5.140.0080.01615.63
5.5.130.0140.00715.63
5.5.120.0110.00815.69
5.5.110.0110.01215.68
5.5.100.0190.00415.83
5.5.90.0050.01915.75
5.5.80.0120.01615.67
5.5.70.0000.02215.45
5.5.60.0120.00815.63
5.5.50.0140.00915.27
5.5.40.0130.01015.53
5.5.30.0160.01015.55
5.5.20.0180.00615.56
5.5.10.0100.01415.43
5.5.00.0110.01115.12
5.4.450.0260.02515.79
5.4.440.0250.02516.00
5.4.430.0230.03016.09
5.4.420.0250.02416.06
5.4.410.0200.02815.69
5.4.400.0240.01815.95
5.4.390.0140.02415.90
5.4.380.0260.03215.64
5.4.370.0240.02715.59
5.4.360.0250.03915.60
5.4.350.0200.03115.50
5.4.340.0190.03315.68
5.4.330.0080.01112.49
5.4.320.0090.02312.59
5.4.310.0040.02612.44
5.4.300.0090.01912.41
5.4.290.0090.02312.51
5.4.280.0100.02112.50
5.4.270.0080.02112.44
5.4.260.0080.02312.43
5.4.250.0050.02512.46
5.4.240.0040.02612.53
5.4.230.0080.02012.47
5.4.220.0100.02012.42
5.4.210.0050.02512.44
5.4.200.0080.02212.27
5.4.190.0090.02012.45
5.4.180.0090.02012.34
5.4.170.0080.02412.41
5.4.160.0050.02412.35
5.4.150.0090.02812.36
5.4.140.0100.02512.22
5.4.130.0100.01912.23
5.4.120.0060.02212.21
5.4.110.0090.02212.18
5.4.100.0100.01912.28
5.4.90.0080.02112.14
5.4.80.0070.02312.18
5.4.70.0070.02112.17
5.4.60.0050.02412.19
5.4.50.0090.02012.21
5.4.40.0080.02012.13
5.4.30.0090.01912.15
5.4.20.0100.01812.16
5.4.10.0050.02112.19
5.4.00.0070.02211.89
5.3.290.0100.03512.80
5.3.280.0110.03312.71
5.3.270.0060.04012.72
5.3.260.0060.04012.71
5.3.250.0040.04212.72
5.3.240.0070.03612.72
5.3.230.0060.03812.71
5.3.220.0080.03512.68
5.3.210.0080.03712.68
5.3.200.0060.03612.68
5.3.190.0080.03512.68
5.3.180.0060.03612.67
5.3.170.0070.04312.67
5.3.160.0060.03612.67
5.3.150.0080.04212.68
5.3.140.0080.03512.66
5.3.130.0070.03812.66
5.3.120.0050.04012.66
5.3.110.0060.03912.66
5.3.100.0080.03512.12
5.3.90.0040.04012.10
5.3.80.0050.03712.09
5.3.70.0060.03612.09
5.3.60.0050.03712.07
5.3.50.0060.03512.02
5.3.40.0080.03412.02
5.3.30.0050.03711.99
5.3.20.0070.03411.76
5.3.10.0060.03511.73
5.3.00.0050.03611.71
5.2.170.0080.0319.22
5.2.160.0050.0289.22
5.2.150.0030.0319.22
5.2.140.0040.0319.21
5.2.130.0040.0299.18
5.2.120.0040.0379.18
5.2.110.0080.0299.18
5.2.100.0020.0309.18
5.2.90.0050.0289.18
5.2.80.0050.0299.17
5.2.70.0060.0299.17
5.2.60.0040.0319.13
5.2.50.0040.0319.09
5.2.40.0050.0299.07
5.2.30.0050.0299.04
5.2.20.0060.0319.04
5.2.10.0050.0278.94
5.2.00.0030.0308.81
5.1.60.0050.0238.09
5.1.50.0040.0258.09
5.1.40.0020.0268.07
5.1.30.0070.0238.41
5.1.20.0010.0308.44
5.1.10.0050.0318.16
5.1.00.0050.0248.16
5.0.50.0020.0226.64
5.0.40.0020.0216.50
5.0.30.0020.0336.32
5.0.20.0020.0216.27
5.0.10.0000.0236.25
5.0.00.0070.0266.25
4.4.90.0020.0164.78
4.4.80.0010.0174.75
4.4.70.0020.0164.75
4.4.60.0040.0144.75
4.4.50.0020.0164.77
4.4.40.0020.0264.71
4.4.30.0020.0164.75
4.4.20.0030.0154.84
4.4.10.0020.0164.85
4.4.00.0060.0214.76
4.3.110.0020.0184.67
4.3.100.0010.0174.67
4.3.90.0060.0114.63
4.3.80.0040.0234.58
4.3.70.0030.0144.63
4.3.60.0010.0154.63
4.3.50.0050.0134.63
4.3.40.0010.0254.53
4.3.30.0030.0143.30
4.3.20.0010.0163.28
4.3.10.0010.0163.23
4.3.00.0000.02015.63

preferences:
41.04 ms | 400 KiB | 5 Q