3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { const MY_CONST = 'This is my const'; } class B { private $property; public function __construct(A $a) { $this->property = $a; echo $a::MY_CONST."<br />"; // works (1) echo A::MY_CONST."<br />"; // works (2) $obj = $this->property; echo $obj::MY_CONST."<br />"; // works (3) echo( $this->__get('property')::MY_CONST ); // doesn't work (4) } }

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.40.0130.00718.58
8.3.30.0120.00918.95
8.3.20.0070.00020.13
8.3.10.0040.00423.48
8.3.00.0040.00419.05
8.2.170.0100.00322.96
8.2.160.0100.00320.39
8.2.150.0080.00024.18
8.2.140.0020.00524.66
8.2.130.0060.00926.16
8.2.120.0000.00722.28
8.2.110.0090.00022.08
8.2.100.0000.01217.66
8.2.90.0050.00318.92
8.2.80.0000.00917.97
8.2.70.0060.00317.50
8.2.60.0030.00617.80
8.2.50.0080.00018.07
8.2.40.0040.00418.03
8.2.30.0040.00417.81
8.2.20.0020.00517.57
8.2.10.0080.00017.80
8.2.00.0030.00617.43
8.1.270.0050.00322.08
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00323.96
8.1.230.0110.00019.05
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.10
8.1.190.0050.00517.41
8.1.180.0030.00518.10
8.1.170.0060.00618.49
8.1.160.0000.00822.01
8.1.150.0000.00718.43
8.1.140.0020.00517.25
8.1.130.0030.00317.77
8.1.120.0090.00017.27
8.1.110.0040.00417.23
8.1.100.0050.00217.32
8.1.90.0050.00317.29
8.1.80.0030.00317.34
8.1.70.0030.00317.34
8.1.60.0040.00417.46
8.1.50.0040.00417.31
8.1.40.0040.00417.48
8.1.30.0060.00317.53
8.1.20.0040.00417.38
8.1.10.0000.00717.38
8.1.00.0000.00717.37
8.0.300.0030.00318.77
8.0.290.0000.00716.80
8.0.280.0050.00218.41
8.0.270.0000.00717.00
8.0.260.0000.00716.97
8.0.250.0040.00416.86
8.0.240.0000.00816.86
8.0.230.0000.00816.88
8.0.220.0000.00716.77
8.0.210.0070.00016.80
8.0.200.0000.00816.76
8.0.190.0080.00016.73
8.0.180.0000.00916.75
8.0.170.0050.00316.79
8.0.160.0000.00716.77
8.0.150.0030.00516.60
8.0.140.0000.00716.73
8.0.130.0050.00013.13
8.0.120.0040.00416.63
8.0.110.0000.00716.65
8.0.100.0040.00416.83
8.0.90.0050.00316.57
8.0.80.0110.00316.75
8.0.70.0000.00716.66
8.0.60.0000.00716.73
8.0.50.0000.00816.74
8.0.30.0090.01116.80
8.0.20.0070.01117.40
8.0.10.0000.00716.78
8.0.00.0130.00516.51
7.4.330.0000.00515.00
7.4.320.0000.00716.48
7.4.300.0030.00316.39
7.4.290.0030.00316.27
7.4.280.0000.00716.40
7.4.270.0040.00416.31
7.4.260.0070.00016.50
7.4.250.0000.00716.32
7.4.240.0020.00516.38
7.4.230.0030.00316.45
7.4.220.0080.00816.30
7.4.210.0070.00816.50
7.4.200.0030.00316.57
7.4.190.0050.00316.36
7.4.160.0090.01216.43
7.4.150.0080.00917.40
7.4.140.0100.01117.86
7.4.130.0070.00916.47
7.4.120.0130.00316.42
7.4.110.0030.01316.23
7.4.100.0110.00616.33
7.4.90.0060.01016.49
7.4.80.0110.00719.39
7.4.70.0110.00916.38
7.4.60.0090.00616.33
7.4.50.0060.00316.08
7.4.40.0090.00522.77
7.4.30.0130.00316.36
7.4.10.0060.01315.08
7.4.00.0080.00814.71
7.3.330.0000.00513.21
7.3.320.0050.00013.00
7.3.310.0000.00716.14
7.3.300.0070.00016.19
7.3.290.0070.00716.20
7.3.280.0080.01016.15
7.3.270.0100.00717.40
7.3.260.0100.00716.34
7.3.250.0130.00716.19
7.3.240.0120.00616.40
7.3.230.0060.01016.46
7.3.210.0030.01316.25
7.3.200.0060.01219.39
7.3.190.0130.00316.14
7.3.180.0090.00616.32
7.3.170.0160.00016.32
7.3.160.0140.00316.23
7.3.130.0100.00714.73
7.3.120.0100.00714.91
7.3.110.0090.00614.60
7.3.100.0120.00614.51
7.3.90.0030.01414.57
7.3.80.0030.01014.62
7.3.70.0030.01214.67
7.3.60.0000.01514.71
7.3.50.0030.00614.57
7.3.40.0090.00614.57
7.3.30.0060.00614.68
7.3.20.0060.00916.54
7.3.10.0070.01016.46
7.3.00.0000.01416.48
7.2.330.0030.01716.54
7.2.320.0150.00916.28
7.2.310.0120.00316.17
7.2.300.0070.01016.29
7.2.290.0030.01316.41
7.2.260.0040.01414.90
7.2.250.0060.01214.88
7.2.240.0090.00614.79
7.2.230.0070.01114.95
7.2.220.0060.00914.94
7.2.210.0040.01214.96
7.2.200.0000.01114.86
7.2.190.0060.01014.95
7.2.180.0060.00914.98
7.2.170.0100.00314.86
7.2.160.0100.00314.52
7.2.150.0030.01316.76
7.2.140.0090.00416.59
7.2.130.0100.00316.78
7.2.120.0000.01616.51
7.2.110.0030.01416.61
7.2.100.0040.00816.52
7.2.90.0000.01816.86
7.2.80.0090.00316.76
7.2.70.0090.00616.80
7.2.60.0070.00916.53
7.2.50.0000.01116.66
7.2.40.0070.01016.64
7.2.30.0070.01416.68
7.2.20.0070.00716.58
7.2.10.0030.01016.80
7.2.00.0090.00517.85
7.1.330.0070.00715.68
7.1.320.0100.00315.63
7.1.310.0040.00915.63
7.1.300.0030.00715.39
7.1.290.0030.01015.69
7.1.280.0070.00715.63
7.1.270.0030.00915.71
7.1.260.0030.01015.50
7.1.250.0030.00915.62
7.1.240.0120.00315.69
7.1.230.0040.00815.67
7.1.220.0060.00815.40
7.1.210.0030.00715.21
7.1.200.0100.00315.59
7.1.190.0090.00015.39
7.1.180.0040.01215.62
7.1.170.0070.00715.18
7.1.160.0070.00715.64
7.1.150.0030.01015.47
7.1.140.0030.00715.66
7.1.130.0030.01015.71
7.1.120.0080.00315.57
7.1.110.0030.00615.81
7.1.100.0010.01116.96
7.1.90.0040.01115.23
7.1.80.0030.00715.69
7.1.70.0050.00516.14
7.1.60.0100.01017.42
7.1.50.0030.01116.28
7.1.40.0040.01115.32
7.1.30.0080.00815.55
7.1.20.0060.00615.42
7.1.10.0060.00615.52
7.1.00.0060.04018.94
7.0.330.0060.00615.21
7.0.320.0100.00615.33
7.0.310.0040.00815.32
7.0.300.0070.00715.20
7.0.290.0130.00015.25
7.0.280.0120.00615.11
7.0.270.0000.01015.09
7.0.260.0070.00415.27
7.0.250.0090.00015.43
7.0.240.0060.00615.40
7.0.230.0090.00615.32
7.0.220.0000.01315.26
7.0.210.0030.01015.31
7.0.200.0090.00215.03
7.0.190.0120.00615.37
7.0.180.0080.00315.01
7.0.170.0080.00515.01
7.0.160.0040.00715.34
7.0.150.0030.01015.13
7.0.140.0070.03918.59
7.0.130.0040.01115.15
7.0.120.0070.00715.15
7.0.110.0090.00315.21
7.0.100.0110.00415.28
7.0.90.0030.01014.88
7.0.80.0030.01015.21
7.0.70.0030.01015.32
7.0.60.0080.03117.59
7.0.50.0020.04116.64
7.0.40.0030.02716.74
7.0.30.0170.03016.77
7.0.20.0100.05016.81
7.0.10.0080.02316.84
7.0.00.0080.04516.79
5.6.400.0080.00814.13
5.6.390.0000.01214.29
5.6.380.0030.00914.24
5.6.370.0100.00314.37
5.6.360.0000.00814.12
5.6.350.0070.00713.88
5.6.340.0090.00614.32
5.6.330.0060.00914.41
5.6.320.0100.00314.18
5.6.310.0000.01114.09
5.6.300.0150.00014.12
5.6.290.0000.00914.09
5.6.280.0070.04017.51
5.6.270.0060.00914.09
5.6.260.0080.00414.20
5.6.250.0070.01014.23
5.6.240.0120.00314.27
5.6.230.0060.00614.20
5.6.220.0030.01314.00
5.6.210.0110.03317.40
5.6.200.0100.03316.19
5.6.190.0040.02417.34
5.6.180.0200.03717.25
5.6.170.0110.02317.35
5.6.160.0030.02917.41
5.6.150.0020.05216.31
5.6.140.0080.04116.19
5.6.130.0090.02516.14
5.6.120.0030.05217.55
5.6.110.0080.04917.72
5.6.100.0080.04517.50
5.6.90.0080.02217.61
5.6.80.0070.04617.26
5.6.70.0130.00013.89
5.6.60.0070.00714.21
5.6.50.0130.00313.95
5.6.40.0040.00814.14
5.6.30.0070.01114.13
5.6.20.0000.01513.91
5.6.10.0080.00614.16
5.6.00.0030.01214.11
5.5.380.0030.01014.14
5.5.370.0000.01114.27
5.5.360.0060.00614.09
5.5.350.0050.03817.30
5.5.340.0000.03816.03
5.5.330.0070.04517.01
5.5.320.0050.03217.25
5.5.310.0200.04017.20
5.5.300.0050.04015.92
5.5.290.0050.04015.95
5.5.280.0060.03317.37
5.5.270.0030.02917.27
5.5.260.0080.03517.34
5.5.250.0080.04017.37
5.5.240.0100.03717.07
5.5.230.0040.00414.02
5.5.220.0100.00314.05
5.5.210.0030.00613.80
5.5.200.0000.01013.89
5.5.190.0070.01013.91
5.5.180.0030.01013.71
5.5.170.0110.00013.88
5.5.160.0090.00313.71
5.5.150.0070.00413.93
5.5.140.0060.01313.87
5.5.130.0070.01013.95
5.5.120.0070.01014.17
5.5.110.0110.00413.79
5.5.100.0090.00613.98
5.5.90.0070.00314.17
5.5.80.0090.00313.82
5.5.70.0000.01113.80
5.5.60.0140.00014.00
5.5.50.0000.01013.97
5.5.40.0070.00413.86
5.5.30.0030.01013.92
5.5.20.0100.00313.63
5.5.10.0070.00414.29
5.5.00.0030.01313.84
5.4.450.0200.03016.26
5.4.440.0100.03216.39
5.4.430.0100.03516.45
5.4.420.0100.03416.27
5.4.410.0170.02916.34
5.4.400.0080.04016.25
5.4.390.0180.03516.30
5.4.380.0200.02815.99
5.4.370.0150.03016.07
5.4.360.0170.03516.05
5.4.350.0110.03516.04
5.4.340.0130.03616.04
5.4.330.0030.00913.35
5.4.320.0030.02212.93
5.4.310.0080.02912.93
5.4.300.0040.02212.94
5.4.290.0060.02012.93
5.4.280.0050.02312.87
5.4.270.0110.03212.87
5.4.260.0060.02912.87
5.4.250.0050.02312.87
5.4.240.0050.02312.87
5.4.230.0050.02312.86
5.4.220.0060.02312.86
5.4.210.0060.02012.86
5.4.200.0070.02212.86
5.4.190.0040.02212.86
5.4.180.0040.02212.86
5.4.170.0050.02712.86
5.4.160.0040.02212.86
5.4.150.0060.02312.86
5.4.140.0060.02912.71
5.4.130.0080.03312.70
5.4.120.0140.05412.68
5.4.110.0070.03112.68
5.4.100.0070.07712.68
5.4.90.0060.03812.67
5.4.80.0070.03312.68
5.4.70.0100.04112.68
5.4.60.0140.03512.67
5.4.50.0110.04912.67
5.4.40.0100.04612.67
5.4.30.0100.03412.67
5.4.20.0150.04912.66
5.4.10.0130.04512.67
5.4.00.0070.02812.41
5.3.290.0040.02213.07
5.3.280.0100.03313.03
5.3.270.0140.05313.04
5.3.260.0120.03913.04
5.3.250.0100.03413.04
5.3.240.0100.03913.03
5.3.230.0160.03913.03
5.3.220.0130.04513.02
5.3.210.0090.03213.01
5.3.200.0140.04613.01
5.3.190.0140.04013.01
5.3.180.0090.04313.01
5.3.170.0150.03513.01
5.3.160.0050.02313.01
5.3.150.0120.04913.01
5.3.140.0090.03613.00
5.3.130.0160.06113.00
5.3.120.0120.04913.00
5.3.110.0140.05113.00
5.3.100.0180.03612.73
5.3.90.0210.06112.72
5.3.80.0070.03012.71
5.3.70.0270.05812.71
5.3.60.0280.04812.70
5.3.50.0200.04112.68
5.3.40.0100.04512.67
5.3.30.0120.03212.66
5.3.20.0120.03212.54
5.3.10.0180.04512.53
5.3.00.0120.03412.52
5.2.170.0280.0719.19
5.2.160.0290.0559.18
5.2.150.0270.0819.18
5.2.140.0160.0619.18
5.2.130.0260.0709.14
5.2.120.0120.0579.14
5.2.110.0340.1039.15
5.2.100.0180.0849.15
5.2.90.0130.0849.14
5.2.80.0140.0519.15
5.2.70.0070.0469.14
5.2.60.0150.0689.09
5.2.50.0130.0559.06
5.2.40.0220.0799.04
5.2.30.0230.0649.03
5.2.20.0090.0489.00
5.2.10.0080.0618.92
5.2.00.0110.0568.79
5.1.60.0120.0448.07
5.1.50.0290.0438.07
5.1.40.0260.0638.05
5.1.30.0160.0478.39
5.1.20.0130.0368.41
5.1.10.0200.0778.14
5.1.00.0130.0758.14
5.0.50.0200.0556.62
5.0.40.0170.0636.48
5.0.30.0180.0756.29
5.0.20.0120.0416.27
5.0.10.0130.0426.23
5.0.00.0120.0796.22
4.4.90.0390.0494.78
4.4.80.0070.0494.76
4.4.70.0110.0514.76
4.4.60.0170.0364.75
4.4.50.0140.0354.77
4.4.40.0090.0644.71
4.4.30.0120.0284.75
4.4.20.0100.0344.85
4.4.10.0090.0364.85
4.4.00.0090.0444.76
4.3.110.0180.0264.67
4.3.100.0100.0414.66
4.3.90.0110.0374.63
4.3.80.0040.0554.58
4.3.70.0210.0654.63
4.3.60.0140.0364.63
4.3.50.0060.0434.63
4.3.40.0120.0714.54
4.3.30.0110.0223.29
4.3.20.0070.0203.26
4.3.10.0080.0333.23
4.3.00.0000.0277.82

preferences:
57.65 ms | 400 KiB | 5 Q