3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Heart{ public function Beat(){ echo 'bump bump'."\n"; } } class Animal{ protected $myVar; protected $heart; public function __construct() { $this->myVar = 'a'; $this->heart = new Heart(); } } class Cat extends Animal { public function foo() { echo $this->myVar."\n"; //echo $this->heart."\n"; echo $this->heart->Beat(); } } $cat = new Cat(); $cat->foo();

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.0090.00618.85
8.3.30.0150.00019.04
8.3.20.0120.00620.34
8.3.10.0040.00423.56
8.3.00.0000.00822.32
8.2.170.0090.00922.96
8.2.160.0100.01022.21
8.2.150.0070.00324.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0050.00322.22
8.2.110.0000.00922.26
8.2.100.0160.00017.68
8.2.90.0000.00819.09
8.2.80.0040.00418.04
8.2.70.0040.00417.38
8.2.60.0000.00818.04
8.2.50.0000.01018.07
8.2.40.0050.00319.34
8.2.30.0070.00018.12
8.2.20.0040.00417.71
8.2.10.0050.00317.63
8.2.00.0030.00717.61
8.1.270.0030.00623.92
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00623.88
8.1.230.0000.01120.88
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00717.47
8.1.190.0030.00617.65
8.1.180.0050.00518.10
8.1.170.0090.00018.61
8.1.160.0030.00522.00
8.1.150.0050.00218.64
8.1.140.0090.00017.46
8.1.130.0030.00317.75
8.1.120.0070.00017.50
8.1.110.0060.00317.44
8.1.100.0030.00517.37
8.1.90.0000.00717.33
8.1.80.0030.00317.46
8.1.70.0000.00717.37
8.1.60.0000.00817.53
8.1.50.0050.00317.41
8.1.40.0060.00317.49
8.1.30.0040.00417.58
8.1.20.0000.00817.60
8.1.10.0090.00017.61
8.1.00.0040.00417.39
8.0.300.0000.00718.77
8.0.290.0040.00417.18
8.0.280.0070.00018.45
8.0.270.0030.00317.23
8.0.260.0060.00316.75
8.0.250.0000.00717.00
8.0.240.0040.00416.99
8.0.230.0040.00417.00
8.0.220.0030.00316.91
8.0.210.0030.00316.91
8.0.200.0000.00716.90
8.0.190.0040.00416.93
8.0.180.0070.00016.94
8.0.170.0030.00516.91
8.0.160.0070.00016.83
8.0.150.0040.00416.84
8.0.140.0040.00416.79
8.0.130.0060.00013.35
8.0.120.0040.00416.97
8.0.110.0040.00416.75
8.0.100.0050.00216.76
8.0.90.0040.00416.96
8.0.80.0070.00716.79
8.0.70.0000.00716.86
8.0.60.0030.00516.70
8.0.50.0000.00816.85
8.0.30.0070.01516.99
8.0.20.0130.01017.40
8.0.10.0000.00716.82
8.0.00.0110.00816.70
7.4.330.0050.00015.00
7.4.320.0060.00016.44
7.4.300.0070.00016.50
7.4.290.0030.00316.56
7.4.280.0030.00316.61
7.4.270.0050.00316.62
7.4.260.0000.00716.55
7.4.250.0070.00016.39
7.4.240.0040.00316.41
7.4.230.0040.00416.41
7.4.220.0070.01016.64
7.4.210.0080.01016.57
7.4.200.0000.00716.61
7.4.190.0040.00416.67
7.4.160.0100.00716.33
7.4.150.0170.00017.40
7.4.140.0140.01017.86
7.4.130.0110.00716.50
7.4.120.0070.01016.46
7.4.110.0120.01216.41
7.4.100.0090.01716.35
7.4.90.0100.01616.41
7.4.80.0090.01216.47
7.4.70.0060.01216.67
7.4.60.0030.01316.40
7.4.50.0000.00616.54
7.4.40.0060.00922.77
7.4.30.0000.01616.63
7.4.10.0100.00614.88
7.4.00.0060.01014.93
7.3.330.0030.00313.24
7.3.320.0000.00613.27
7.3.310.0030.00416.35
7.3.300.0020.00516.29
7.3.290.0120.00316.38
7.3.280.0080.00816.33
7.3.270.0130.00417.40
7.3.260.0130.00916.58
7.3.250.0090.00816.31
7.3.240.0100.01016.23
7.3.230.0100.00716.39
7.3.210.0080.01116.36
7.3.200.0090.00919.39
7.3.190.0060.00916.55
7.3.180.0080.00816.33
7.3.170.0120.00316.29
7.3.160.0060.01016.42
7.3.130.0070.01114.94
7.3.120.0120.00514.90
7.3.110.0070.01114.47
7.3.100.0040.01114.59
7.3.90.0030.00614.90
7.3.80.0080.00814.75
7.3.70.0030.00614.81
7.3.60.0060.00614.77
7.3.50.0110.00014.71
7.3.40.0070.01014.81
7.3.30.0090.00314.45
7.3.20.0100.00316.71
7.3.10.0060.01016.45
7.3.00.0030.01016.63
7.2.330.0090.00616.87
7.2.320.0080.00816.74
7.2.310.0100.00716.66
7.2.300.0100.00716.65
7.2.290.0120.00616.48
7.2.260.0070.01114.93
7.2.250.0090.00914.72
7.2.240.0070.01014.80
7.2.230.0000.01414.97
7.2.220.0080.00815.27
7.2.210.0090.00614.94
7.2.200.0110.00315.14
7.2.190.0070.00714.91
7.2.180.0090.00614.98
7.2.170.0060.00915.08
7.2.160.0080.00814.90
7.2.150.0070.00716.84
7.2.140.0040.01416.78
7.2.130.0030.00616.73
7.2.120.0040.01216.65
7.2.110.0070.01116.83
7.2.100.0070.01416.64
7.2.90.0040.00916.77
7.2.80.0060.00616.94
7.2.70.0100.01016.75
7.2.60.0070.01416.82
7.2.50.0110.01116.86
7.2.40.0030.01216.73
7.2.30.0070.01116.90
7.2.20.0110.00616.86
7.2.10.0120.00316.63
7.2.00.0050.01018.08
7.1.330.0100.00315.79
7.1.320.0070.01015.52
7.1.310.0070.01015.76
7.1.300.0040.01115.70
7.1.290.0060.00915.78
7.1.280.0080.00815.75
7.1.270.0100.00315.41
7.1.260.0080.00815.86
7.1.250.0130.00015.71
7.1.240.0040.00815.88
7.1.230.0030.01315.58
7.1.220.0070.00715.62
7.1.210.0060.00615.63
7.1.200.0080.00615.56
7.1.190.0070.01015.44
7.1.180.0040.01115.65
7.1.170.0040.00815.71
7.1.160.0040.00715.81
7.1.150.0070.01115.58
7.1.140.0060.00915.74
7.1.130.0040.00915.83
7.1.120.0060.00915.79
7.1.110.0040.01215.80
7.1.100.0050.00916.99
7.1.90.0030.01015.79
7.1.80.0110.00015.58
7.1.70.0080.00516.37
7.1.60.0150.00517.37
7.1.50.0080.00616.29
7.1.40.0090.00615.67
7.1.30.0030.01015.72
7.1.20.0030.01315.59
7.1.10.0050.00515.63
7.1.00.0070.04019.08
7.0.330.0000.01415.25
7.0.320.0130.00615.32
7.0.310.0090.00615.54
7.0.300.0000.01315.13
7.0.290.0100.00315.06
7.0.280.0060.00615.29
7.0.270.0030.00615.54
7.0.260.0040.00815.27
7.0.250.0070.00715.43
7.0.240.0040.00815.45
7.0.230.0080.00415.08
7.0.220.0080.00815.41
7.0.210.0100.00615.53
7.0.200.0040.00916.01
7.0.190.0040.01115.30
7.0.180.0000.01115.45
7.0.170.0030.00915.42
7.0.160.0110.00815.52
7.0.150.0070.00715.28
7.0.140.0060.04118.66
7.0.130.0030.01415.07
7.0.120.0040.00715.32
7.0.110.0350.04317.71
7.0.100.0370.03917.77
7.0.90.0320.03017.63
7.0.80.0300.04717.70
7.0.70.0280.02517.67
7.0.60.0340.04217.74
7.0.50.0270.04717.81
7.0.40.0040.02716.78
7.0.30.0070.04216.71
7.0.20.0070.04516.78
7.0.10.0020.04516.85
7.0.00.0050.04516.76
5.6.400.0070.00714.12
5.6.390.0060.00614.16
5.6.380.0060.00314.37
5.6.370.0120.00314.58
5.6.360.0000.01214.33
5.6.350.0070.01014.48
5.6.340.0070.00714.29
5.6.330.0080.00414.57
5.6.320.0050.00514.53
5.6.310.0030.01014.60
5.6.300.0090.00914.40
5.6.290.0100.01014.69
5.6.280.0070.03717.62
5.6.270.0050.00414.13
5.6.260.0110.00414.46
5.6.250.0110.04017.64
5.6.240.0120.03317.35
5.6.230.0080.04317.42
5.6.220.0060.04517.39
5.6.210.0100.04017.51
5.6.200.0080.05217.75
5.6.190.0130.04217.58
5.6.180.0120.03617.65
5.6.170.0030.05017.61
5.6.160.0120.04217.74
5.6.150.0110.04217.80
5.6.140.0060.04817.73
5.6.130.0030.04717.69
5.6.120.0080.04517.69
5.6.110.0070.04617.55
5.6.100.0060.04317.75
5.6.90.0060.03917.59
5.6.80.0050.04617.40
5.6.70.0120.03717.39
5.6.60.0080.04517.44
5.6.50.0080.04517.39
5.6.40.0130.03717.40
5.6.30.0100.04017.34
5.6.20.0080.04217.43
5.6.10.0060.02617.38
5.6.00.0110.03617.24
5.5.380.0090.03617.23
5.5.370.0180.01917.29
5.5.360.0060.04217.38
5.5.350.0070.02917.25
5.5.340.0100.03317.64
5.5.330.0050.04317.71
5.5.320.0100.03917.57
5.5.310.0130.03817.60
5.5.300.0060.04017.56
5.5.290.0050.04317.61
5.5.280.0080.04317.57
5.5.270.0120.04217.64
5.5.260.0030.04817.53
5.5.250.0020.04717.29
5.5.240.0080.04017.28
5.5.230.0060.04217.30
5.5.220.0050.02917.31
5.5.210.0080.04317.31
5.5.200.0080.04017.15
5.5.190.0080.04317.29
5.5.180.0070.04317.18
5.5.170.0110.00414.39
5.5.160.0030.04817.10
5.5.150.0070.03217.28
5.5.140.0030.04517.33
5.5.130.0080.04317.06
5.5.120.0060.03017.24
5.5.110.0080.04317.24
5.5.100.0110.03617.11
5.5.90.0080.03817.24
5.5.80.0060.02117.29
5.5.70.0020.04417.14
5.5.60.0050.02417.24
5.5.50.0100.03717.20
5.5.40.0070.03017.01
5.5.30.0020.04517.25
5.5.20.0050.03917.08
5.5.10.0080.04017.06
5.5.00.0100.03817.14
5.4.450.0050.04315.25
5.4.440.0020.04815.25
5.4.430.0020.04715.27
5.4.420.0070.04015.47
5.4.410.0050.03215.27
5.4.400.0070.04215.24
5.4.390.0030.04015.28
5.4.380.0050.04415.23
5.4.370.0070.04015.16
5.4.360.0040.02715.20
5.4.350.0060.03915.16
5.4.340.0030.04315.16
5.4.330.0080.00311.16
5.4.320.0070.04015.22
5.4.310.0070.03715.13
5.4.300.0100.03515.07
5.4.290.0100.03815.20
5.4.280.0050.03515.11
5.4.270.0080.03815.22
5.4.260.0060.03615.10
5.4.250.0040.02615.12
5.4.240.0050.02415.19
5.4.230.0020.04315.25
5.4.220.0070.03315.17
5.4.210.0050.03715.22
5.4.200.0050.04215.23
5.4.190.0050.04315.11
5.4.180.0050.03815.18
5.4.170.0130.03315.26
5.4.160.0120.03015.12
5.4.150.0050.03915.11
5.4.140.0100.03513.75
5.4.130.0080.03713.84
5.4.120.0060.03813.74
5.4.110.0050.03313.92
5.4.100.0030.04113.79
5.4.90.0060.02413.90
5.4.80.0090.03713.83
5.4.70.0100.03313.90
5.4.60.0000.02813.84
5.4.50.0030.04013.72
5.4.40.0080.03813.75
5.4.30.0030.04213.82
5.4.20.0050.03513.73
5.4.10.0030.04313.85
5.4.00.0100.03713.46
5.3.290.0090.03812.92
5.3.280.0100.03513.00
5.3.270.0080.03712.90
5.3.260.0070.03912.87
5.3.250.0030.04212.95
5.3.240.0050.02912.95
5.3.230.0060.03812.92
5.3.220.0030.04812.91
5.3.210.0030.02912.88
5.3.200.0020.04412.91
5.3.190.0050.04112.88
5.3.180.0030.02712.87
5.3.170.0020.04412.98
5.3.160.0050.04012.93
5.3.150.0060.04012.87
5.3.140.0070.03712.90
5.3.130.0030.04412.90
5.3.120.0100.03512.86
5.3.110.0050.04212.93
5.3.100.0060.04312.61
5.3.90.0030.04012.61
5.3.80.0050.03412.57
5.3.70.0110.03012.61
5.3.60.0040.04012.51
5.3.50.0050.03912.60
5.3.40.0050.04012.63
5.3.30.0060.03312.65
5.3.20.0030.02412.44
5.3.10.0020.04012.48
5.3.00.0050.02612.47
5.2.170.0030.06311.23
5.2.160.0000.06311.14
5.2.150.0070.06711.22
5.2.140.0000.07011.22
5.2.130.0070.05711.10
5.2.120.0030.05311.12
5.2.110.0070.06011.18
5.2.100.0070.06011.10
5.2.90.0130.05311.07
5.2.80.0070.05311.12
5.2.70.0070.05711.16
5.2.60.0070.05711.05
5.2.50.0030.06311.04
5.2.40.0070.05310.98
5.2.30.0030.06011.06
5.2.20.0030.06711.04
5.2.10.0000.06310.84
5.2.00.0030.06010.70
5.1.60.0030.0539.96
5.1.50.0030.05010.18
5.1.40.0070.0509.96
5.1.30.0030.06010.43
5.1.20.0100.05310.58
5.1.10.0000.04010.33
5.1.00.0030.05710.13
5.0.50.0070.0409.85
5.0.40.0030.0439.85
5.0.30.0130.0509.85
5.0.20.0030.0379.85
5.0.10.0070.0439.85
5.0.00.0100.0539.85
4.4.90.0000.0409.85
4.4.80.0000.0339.85
4.4.70.0070.0309.85
4.4.60.0070.0309.85
4.4.50.0000.0309.85
4.4.40.0030.0339.85
4.4.30.0000.0279.85
4.4.20.0030.0309.85
4.4.10.0030.0209.85
4.4.00.0070.0409.85
4.3.110.0030.0339.85
4.3.100.0000.0209.85
4.3.90.0000.0179.85
4.3.80.0000.0509.85
4.3.70.0030.0279.85
4.3.60.0030.0339.85
4.3.50.0030.0339.85
4.3.40.0030.0539.85
4.3.30.0000.0379.85
4.3.20.0000.0339.85
4.3.10.0000.0379.85
4.3.00.0030.0309.85

preferences:
48.84 ms | 400 KiB | 5 Q