3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $_prot; public function __toString() { return (string) $this->_prot; } } class C extends A { protected $_c; } class B extends A { static function test(A $a) { $a->_prot = 5; if (isset($a->_c)) { echo '_c:', $a->_c, " "; } echo "_a:", $a, "\n"; } } $a = new A; $b = new B; $c = new C; B::test($a); B::test($b); B::test($c);

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.0030.01718.94
8.3.30.0100.00320.35
8.3.20.0050.00320.34
8.3.10.0050.00321.22
8.3.00.0120.00622.52
8.2.170.0090.00622.96
8.2.160.0100.00722.26
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0050.00326.16
8.2.120.0080.00020.69
8.2.110.0030.00719.24
8.2.100.0080.00417.78
8.2.90.0040.00419.12
8.2.80.0090.00018.03
8.2.70.0040.00417.50
8.2.60.0080.00018.16
8.2.50.0000.00818.07
8.2.40.0070.00018.15
8.2.30.0030.00319.44
8.2.20.0070.00017.68
8.2.10.0000.00817.66
8.2.00.0000.00817.68
8.1.270.0030.00523.99
8.1.260.0000.00826.35
8.1.250.0090.00028.09
8.1.240.0060.00620.40
8.1.230.0060.00620.97
8.1.220.0030.00618.77
8.1.210.0100.00018.98
8.1.200.0040.00417.35
8.1.190.0070.00017.52
8.1.180.0050.00318.10
8.1.170.0000.00818.46
8.1.160.0040.00418.84
8.1.150.0000.00718.68
8.1.140.0070.00017.37
8.1.130.0000.00717.83
8.1.120.0040.00417.46
8.1.110.0070.00017.35
8.1.100.0040.00417.43
8.1.90.0030.00417.37
8.1.80.0000.00717.51
8.1.70.0080.00017.35
8.1.60.0030.00617.61
8.1.50.0040.00417.44
8.1.40.0040.00417.39
8.1.30.0080.00017.50
8.1.20.0090.00017.48
8.1.10.0000.00817.59
8.1.00.0040.00417.49
8.0.300.0040.00419.78
8.0.290.0070.00017.15
8.0.280.0040.00418.50
8.0.270.0030.00317.38
8.0.260.0030.00316.89
8.0.250.0030.00317.06
8.0.240.0030.00516.90
8.0.230.0000.00716.88
8.0.220.0000.00616.90
8.0.210.0000.00716.96
8.0.200.0030.00317.07
8.0.190.0070.00016.85
8.0.180.0040.00416.95
8.0.170.0040.00417.00
8.0.160.0040.00417.04
8.0.150.0030.00516.86
8.0.140.0030.00416.91
8.0.130.0030.00313.47
8.0.120.0000.00716.91
8.0.110.0040.00417.00
8.0.100.0070.00016.94
8.0.90.0020.00516.82
8.0.80.0150.00016.91
8.0.70.0000.00716.95
8.0.60.0050.00216.90
8.0.50.0000.00716.90
8.0.30.0050.01416.99
8.0.20.0120.00717.40
8.0.10.0030.00416.95
8.0.00.0170.00416.75
7.4.330.0030.00315.05
7.4.320.0030.00316.45
7.4.300.0040.00416.58
7.4.290.0000.00716.49
7.4.280.0000.00716.52
7.4.270.0000.00716.61
7.4.260.0000.00513.28
7.4.250.0030.00516.46
7.4.240.0040.00316.49
7.4.230.0040.00416.68
7.4.220.0060.01016.64
7.4.210.0060.00916.50
7.4.200.0030.00316.70
7.4.190.0070.00016.41
7.4.160.0090.00616.56
7.4.150.0070.01117.40
7.4.140.0070.01117.86
7.4.130.0090.00816.54
7.4.120.0120.00416.49
7.4.110.0090.00916.41
7.4.100.0070.01416.28
7.4.90.0030.01516.40
7.4.80.0060.01219.39
7.4.70.0130.00316.52
7.4.60.0100.00716.55
7.4.50.0030.00516.49
7.4.40.0070.00722.77
7.4.30.0170.00016.57
7.4.10.0060.01215.07
7.4.00.0040.01114.95
7.3.330.0030.00313.07
7.3.320.0050.00013.16
7.3.310.0040.00416.20
7.3.300.0000.00716.24
7.3.290.0060.00916.31
7.3.280.0090.00916.27
7.3.270.0140.00317.40
7.3.260.0070.01318.24
7.3.250.0110.00816.53
7.3.240.0170.00016.40
7.3.230.0070.01016.50
7.3.210.0070.01016.44
7.3.200.0060.01519.39
7.3.190.0050.01116.32
7.3.180.0170.00716.70
7.3.170.0130.00316.45
7.3.160.0100.00616.70
7.3.130.0000.01715.13
7.3.120.0070.01014.90
7.3.110.0080.00814.88
7.3.100.0070.00714.92
7.3.90.0070.01014.81
7.3.80.0050.00914.97
7.3.70.0050.00914.89
7.3.60.0030.01114.86
7.3.50.0050.01214.88
7.3.40.0060.00614.81
7.3.30.0060.00914.77
7.3.20.0040.00616.67
7.3.10.0080.00816.64
7.3.00.0040.00916.71
7.2.330.0030.01516.79
7.2.320.0070.01716.67
7.2.310.0080.01016.61
7.2.300.0080.00816.80
7.2.290.0070.01116.74
7.2.260.0090.00315.01
7.2.250.0060.01015.05
7.2.240.0080.00815.17
7.2.230.0070.00915.15
7.2.220.0080.00514.88
7.2.210.0060.00615.24
7.2.200.0060.00915.18
7.2.190.0080.00715.05
7.2.180.0040.01314.94
7.2.170.0060.00615.01
7.2.160.0070.00314.74
7.2.150.0030.00916.57
7.2.140.0030.00916.57
7.2.130.0070.00916.98
7.2.120.0110.00616.88
7.2.110.0080.00716.66
7.2.100.0050.00916.96
7.2.90.0100.00817.04
7.2.80.0070.00716.89
7.2.70.0040.01216.96
7.2.60.0030.01216.91
7.2.50.0080.00717.17
7.2.40.0050.01016.89
7.2.30.0070.00817.13
7.2.20.0130.00417.03
7.2.10.0080.00716.85
7.2.00.0120.00416.86
7.1.330.0080.00315.95
7.1.320.0080.00715.75
7.1.310.0100.00315.79
7.1.300.0110.00515.65
7.1.290.0040.00815.81
7.1.280.0060.00615.77
7.1.270.0080.00515.78
7.1.260.0080.00815.72
7.1.250.0110.00615.81
7.1.240.0090.00515.76
7.1.230.0110.00315.86
7.1.220.0090.00515.72
7.1.210.0120.00115.79
7.1.200.0080.01115.59
7.1.190.0070.00815.58
7.1.180.0030.01015.77
7.1.170.0100.00315.63
7.1.160.0120.00515.97
7.1.150.0080.00615.74
7.1.140.0060.01015.77
7.1.130.0140.00215.83
7.1.120.0050.01015.72
7.1.110.0060.00815.88
7.1.100.0070.01015.77
7.1.90.0120.00415.86
7.1.80.0110.00415.69
7.1.70.0040.00916.18
7.1.60.0090.00816.90
7.1.50.0130.00716.19
7.1.40.0060.01015.66
7.1.30.0080.00815.59
7.1.20.0060.01115.67
7.1.10.0090.01115.89
7.1.00.0080.01617.93
7.0.330.0130.00315.52
7.0.320.0060.01115.05
7.0.310.0100.00815.32
7.0.300.0060.00915.22
7.0.290.0140.00315.34
7.0.280.0060.01015.53
7.0.270.0080.01015.49
7.0.260.0070.00815.31
7.0.250.0090.00615.53
7.0.240.0100.00915.53
7.0.230.0090.00915.48
7.0.220.0070.00915.54
7.0.210.0070.00715.22
7.0.200.0080.00715.89
7.0.190.0110.00815.41
7.0.180.0100.00915.32
7.0.170.0160.00515.37
7.0.160.0130.00615.35
7.0.150.0150.00315.28
7.0.140.0080.03017.70
7.0.130.0110.00915.22
7.0.120.0120.00715.21
7.0.110.0120.00615.21
7.0.100.0060.03317.64
7.0.90.0060.03117.47
7.0.80.0050.03417.47
7.0.70.0080.03317.50
7.0.60.0080.03117.57
7.0.50.0160.02717.62
7.0.40.0090.02015.68
7.0.30.0060.02115.72
7.0.20.0050.02715.66
7.0.10.0060.01815.68
7.0.00.0030.02515.64
5.6.400.0090.00314.61
5.6.390.0030.01414.36
5.6.380.0050.00914.33
5.6.370.0110.00714.49
5.6.360.0070.01314.54
5.6.350.0050.01214.24
5.6.340.0100.00814.34
5.6.330.0010.01314.36
5.6.320.0100.01214.40
5.6.310.0120.00814.51
5.6.300.0120.00814.43
5.6.290.0130.00614.40
5.6.280.0090.03016.57
5.6.270.0160.00414.58
5.6.260.0110.00614.31
5.6.250.0110.03116.48
5.6.240.0110.03316.52
5.6.230.0080.03316.47
5.6.220.0100.02716.41
5.6.210.0050.03316.49
5.6.200.0060.03216.45
5.6.190.0090.01816.69
5.6.180.0030.02416.52
5.6.170.0060.02116.65
5.6.160.0030.02116.60
5.6.150.0020.01916.54
5.6.140.0050.02216.66
5.6.130.0020.02416.57
5.6.120.0070.01616.73
5.6.110.0060.02116.70
5.6.100.0040.02716.58
5.6.90.0060.03116.52
5.6.80.0020.03116.39
5.6.70.0050.02716.30
5.6.60.0080.02516.36
5.6.50.0070.02216.31
5.6.40.0080.01416.38
5.6.30.0050.01916.40
5.6.20.0080.01516.43
5.6.10.0080.01516.33
5.6.00.0070.01816.36
5.5.380.0090.03115.30
5.5.370.0050.02115.42
5.5.360.0040.03215.44
5.5.350.0020.03515.19
5.5.340.0070.03215.43
5.5.330.0080.02515.32
5.5.320.0070.01515.47
5.5.310.0030.02015.45
5.5.300.0050.03215.45
5.5.290.0090.01615.41
5.5.280.0040.02615.64
5.5.270.0040.01715.55
5.5.260.0070.03215.44
5.5.250.0030.03515.29
5.5.240.0060.02415.12
5.5.230.0020.02115.14
5.5.220.0030.02815.12
5.5.210.0040.02815.16
5.5.200.0040.01815.17
5.5.190.0040.02115.35
5.5.180.0030.02015.22
5.5.170.0030.01012.55
5.5.160.0010.02015.21
5.5.150.0040.02314.96
5.5.140.0050.02815.11
5.5.130.0030.02815.17
5.5.120.0030.02815.11
5.5.110.0020.01615.28
5.5.100.0090.01815.08
5.5.90.0080.02015.27
5.5.80.0020.02115.22
5.5.70.0030.02615.23
5.5.60.0060.01715.19
5.5.50.0050.01615.11
5.5.40.0030.02815.19
5.5.30.0050.02615.00
5.5.20.0020.03215.31
5.5.10.0050.03114.99
5.5.00.0030.03315.11
5.4.450.0040.02614.22
5.4.440.0040.01814.10
5.4.430.0030.03014.13
5.4.420.0030.03014.05
5.4.410.0030.02214.15
5.4.400.0050.01814.07
5.4.390.0030.02913.97
5.4.380.0060.01114.00
5.4.370.0040.01513.94
5.4.360.0040.01413.98
5.4.350.0010.01713.87
5.4.340.0060.02114.11
5.4.330.0060.00411.50
5.4.320.0060.01314.01
5.4.310.0050.01414.01
5.4.300.0040.01913.93
5.4.290.0020.02313.99
5.4.280.0030.01414.02
5.4.270.0010.03114.07
5.4.260.0050.01313.93
5.4.250.0020.01713.93
5.4.240.0040.01513.89
5.4.230.0040.01513.97
5.4.220.0030.02513.96
5.4.210.0040.02713.87
5.4.200.0040.01314.03
5.4.190.0030.02413.91
5.4.180.0040.02913.84
5.4.170.0050.02513.98
5.4.160.0050.02413.85
5.4.150.0090.02714.04
5.4.140.0060.02812.90
5.4.130.0070.02413.10
5.4.120.0030.03013.06
5.4.110.0070.02712.90
5.4.100.0040.02913.06
5.4.90.0050.02913.05
5.4.80.0060.02713.02
5.4.70.0060.03012.98
5.4.60.0060.02813.11
5.4.50.0080.02313.14
5.4.40.0110.02613.12
5.4.30.0050.02413.14
5.4.20.0050.02212.97
5.4.10.0050.02213.03
5.4.00.0080.02512.81
5.3.290.0020.02212.36
5.3.280.0010.01812.29
5.3.270.0010.03212.40
5.3.260.0070.01912.29
5.3.250.0060.01912.36
5.3.240.0050.03012.34
5.3.230.0060.02912.35
5.3.220.0010.03212.34
5.3.210.0040.02812.31
5.3.200.0010.03312.27
5.3.190.0060.03012.28
5.3.180.0050.03012.36
5.3.170.0060.02912.28
5.3.160.0050.02912.40
5.3.150.0050.02512.27
5.3.140.0060.03112.22
5.3.130.0020.03212.37
5.3.120.0060.02112.37
5.3.110.0050.02812.33
5.3.100.0060.02812.07
5.3.90.0060.02812.13
5.3.80.0070.02812.06
5.3.70.0040.03112.08
5.3.60.0070.02712.07
5.3.50.0070.02512.09
5.3.40.0070.02712.13
5.3.30.0040.02612.13
5.3.20.0060.02512.00
5.3.10.0060.02411.95
5.3.00.0050.01811.89
5.2.170.0070.03210.29
5.2.160.0000.03710.33
5.2.150.0030.03510.43
5.2.140.0020.03710.40
5.2.130.0070.03010.18
5.2.120.0030.03510.27
5.2.110.0020.03810.35
5.2.100.0000.03510.39
5.2.90.0060.03010.33
5.2.80.0030.03110.33
5.2.70.0080.03110.18
5.2.60.0070.03110.11
5.2.50.0030.03310.23
5.2.40.0020.02710.18
5.2.30.0050.03210.01
5.2.20.0040.03310.17
5.2.10.0030.03110.12
5.2.00.0020.0279.94
5.1.60.0030.0289.44
5.1.50.0030.0309.43
5.1.40.0050.0279.56
5.1.30.0030.0329.70
5.1.20.0030.0289.71
5.1.10.0020.0309.59
5.1.00.0040.0309.58
5.0.50.0030.0238.81
5.0.40.0030.0238.74
5.0.30.0050.0338.55
5.0.20.0030.0248.53
5.0.10.0020.0228.52
5.0.00.0020.0328.64
4.4.90.0000.0218.48
4.4.80.0020.0208.48
4.4.70.0020.0168.48
4.4.60.0030.0188.48
4.4.50.0060.0168.48
4.4.40.0020.0198.48
4.4.30.0000.0208.48
4.4.20.0020.0188.48
4.4.10.0000.0208.48
4.4.00.0030.0278.48
4.3.110.0050.0148.48
4.3.100.0000.0218.48
4.3.90.0020.0188.48
4.3.80.0050.0258.48
4.3.70.0020.0188.48
4.3.60.0020.0178.48
4.3.50.0040.0198.48
4.3.40.0010.0268.48
4.3.30.0040.0188.48
4.3.20.0020.0198.48
4.3.10.0010.0118.48
4.3.00.0020.0188.48

preferences:
49.17 ms | 400 KiB | 5 Q