3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass { private $name = 'Parent'; public function getName() { return $this->name; } public function setName($name) { $this->name = $name; } } class Child extends ParentClass { public $name = 'Child'; } $parent = new ParentClass(); echo "\nParent name: " . $parent->getName(); echo "\nSetting parent name to 'old'"; $parent->setName('old'); echo "\nParent name after change: " . $parent->getName(); $child = new Child(); echo "\nChild name by getter: " . $child->getName(); echo "\nChild name by prop: " . $child->name; $reflect = new ReflectionClass($child); $props = $reflect->getProperties(\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED | \ReflectionProperty::IS_PRIVATE); var_export($props);

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.73
8.3.30.0040.01118.91
8.3.20.0040.01120.37
8.3.10.0030.00521.85
8.3.00.0100.00019.16
8.2.170.0070.00722.96
8.2.160.0100.00320.58
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00022.04
8.2.110.0090.00020.58
8.2.100.0060.00617.72
8.2.90.0030.00518.09
8.2.80.0060.00319.63
8.2.70.0000.00817.50
8.2.60.0040.00417.50
8.2.50.0030.00617.55
8.2.40.0000.00820.59
8.2.30.0000.00717.97
8.2.20.0040.00417.71
8.2.10.0080.00017.95
8.2.00.0050.00317.99
8.1.270.0100.01020.38
8.1.260.0020.00526.35
8.1.250.0070.01128.09
8.1.240.0030.00622.05
8.1.230.0110.00020.84
8.1.220.0040.00417.74
8.1.210.0040.00418.88
8.1.200.0060.00317.51
8.1.190.0040.00417.11
8.1.180.0030.00519.31
8.1.170.0040.00418.51
8.1.160.0000.00821.89
8.1.150.0060.00318.81
8.1.140.0050.00217.29
8.1.130.0000.00717.58
8.1.120.0040.00417.42
8.1.110.0050.00217.46
8.1.100.0070.00017.45
8.1.90.0000.00817.43
8.1.80.0040.00417.46
8.1.70.0070.00017.45
8.1.60.0080.00017.65
8.1.50.0030.00517.52
8.1.40.0040.00417.56
8.1.30.0040.00417.72
8.1.20.0000.00817.59
8.1.10.0000.00717.61
8.1.00.0000.00917.58
8.0.300.0070.00020.09
8.0.290.0020.00516.75
8.0.280.0030.00318.53
8.0.270.0030.00317.33
8.0.260.0000.00717.18
8.0.250.0000.00716.89
8.0.240.0080.00017.01
8.0.230.0000.00717.01
8.0.220.0000.00616.92
8.0.210.0020.00516.79
8.0.200.0030.00316.85
8.0.190.0080.00016.96
8.0.180.0030.00916.88
8.0.170.0050.00317.00
8.0.160.0050.00316.93
8.0.150.0000.00816.93
8.0.140.0040.00416.77
8.0.130.0050.00213.36
8.0.120.0060.00316.95
8.0.110.0070.00016.82
8.0.100.0040.00416.81
8.0.90.0040.00416.81
8.0.80.0040.01816.91
8.0.70.0070.00016.73
8.0.60.0050.00316.87
8.0.50.0000.00816.72
8.0.30.0110.00817.32
8.0.20.0120.01017.40
8.0.10.0040.00416.97
8.0.00.0100.00716.84
7.4.330.0000.00515.04
7.4.320.0030.00316.50
7.4.300.0040.00416.64
7.4.290.0030.00316.68
7.4.280.0000.00716.53
7.4.270.0030.00316.54
7.4.260.0050.00316.59
7.4.250.0000.00816.62
7.4.240.0040.00416.44
7.4.230.0070.00016.53
7.4.220.0030.02216.57
7.4.210.0060.00916.59
7.4.200.0030.00516.64
7.4.160.0150.00016.69
7.4.150.0120.00617.40
7.4.140.0120.00717.86
7.4.130.0070.01116.58
7.4.120.0090.00816.54
7.4.110.0040.01416.45
7.4.100.0130.00616.50
7.4.90.0030.01416.33
7.4.80.0100.00719.39
7.4.70.0060.01416.68
7.4.60.0120.00916.68
7.4.50.0080.00016.61
7.4.40.0080.00816.21
7.4.30.0110.01216.52
7.4.10.0090.01316.21
7.4.00.0060.00915.74
7.3.330.0060.00013.33
7.3.320.0030.00213.29
7.3.310.0000.00716.22
7.3.300.0000.00716.34
7.3.290.0120.00416.33
7.3.280.0120.00716.31
7.3.270.0130.00617.40
7.3.260.0150.00316.38
7.3.240.0130.01016.40
7.3.230.0070.01416.39
7.3.210.0160.00616.25
7.3.200.0140.01119.39
7.3.190.0070.01016.39
7.3.180.0060.01516.35
7.3.170.0130.01016.40
7.3.160.0120.00816.28
7.3.130.0070.01316.43
7.3.120.0040.01416.34
7.3.110.0030.01216.47
7.3.100.0070.00316.40
7.3.90.0070.01116.13
7.3.80.0070.00316.46
7.3.70.0090.00616.27
7.3.60.0060.00916.27
7.3.50.0030.01316.29
7.3.40.0040.00416.21
7.3.30.0030.01316.42
7.3.20.0130.00317.99
7.3.10.0140.01017.04
7.3.00.0130.00916.86
7.2.330.0000.01916.75
7.2.320.0130.00516.81
7.2.310.0100.00716.51
7.2.300.0130.00316.81
7.2.290.0140.00316.50
7.2.260.0030.01316.70
7.2.250.0070.01416.42
7.2.240.0060.01016.69
7.2.230.0100.01016.66
7.2.220.0070.01116.54
7.2.210.0030.01416.63
7.2.200.0040.00716.45
7.2.190.0070.01016.52
7.2.180.0110.00416.60
7.2.170.0090.00016.77
7.2.160.0080.00316.47
7.2.150.0100.00318.31
7.2.140.0080.00818.33
7.2.130.0130.00617.11
7.2.120.0100.00717.30
7.2.110.0200.00517.00
7.2.100.0160.00417.34
7.2.90.0090.00916.98
7.2.80.0100.00717.12
7.2.70.0070.00717.28
7.2.60.0090.00717.26
7.2.50.0080.00517.36
7.2.40.0160.00417.15
7.2.30.0160.00817.44
7.2.20.0050.00917.22
7.2.10.0090.01017.49
7.2.00.0070.00917.94
7.1.330.0070.01017.58
7.1.320.0070.00317.20
7.1.310.0060.00917.39
7.1.300.0030.01017.39
7.1.290.0060.00617.45
7.1.280.0060.00617.53
7.1.270.0100.00717.38
7.1.260.0130.00317.43
7.1.250.0080.00716.17
7.1.240.0120.00317.39
7.1.230.0060.01017.30
7.1.220.0110.00417.30
7.1.210.0060.00617.37
7.1.200.0080.00716.67
7.1.190.0070.00717.54
7.1.180.0030.01017.28
7.1.170.0040.00717.43
7.1.160.0090.00617.25
7.1.150.0030.01017.34
7.1.140.0030.00617.36
7.1.130.0090.00617.43
7.1.120.0100.00317.46
7.1.110.0030.00717.43
7.1.100.0080.00817.71
7.1.90.0070.00717.45
7.1.80.0030.01217.20
7.1.70.0030.00617.36
7.1.60.0080.01018.54
7.1.50.0020.01117.06
7.1.40.0080.00817.50
7.1.30.0040.00417.34
7.1.20.0030.00617.50
7.1.10.0070.00717.18
7.1.00.0050.03819.84
7.0.330.0060.00616.95
7.0.320.0000.01317.00
7.0.310.0090.00616.96
7.0.300.0060.00316.93
7.0.290.0030.01316.96
7.0.280.0040.00817.08
7.0.270.0000.01617.03
7.0.260.0070.00717.16
7.0.250.0100.00317.17
7.0.240.0000.00917.06
7.0.230.0030.01317.02
7.0.220.0040.01116.93
7.0.210.0080.00417.11
7.0.200.0030.00516.80
7.0.190.0110.00716.86
7.0.180.0030.00916.98
7.0.170.0030.00916.89
7.0.160.0030.00717.05
7.0.150.0080.00816.96
7.0.140.0140.00016.95
7.0.130.0030.01017.04
7.0.120.0030.01017.09
7.0.110.0070.00716.78
7.0.100.0030.00616.91
7.0.90.0080.00617.14
7.0.80.0060.00316.94
7.0.70.0000.00916.86
7.0.60.0060.02918.46
7.0.50.0030.03017.44
7.0.40.0050.02417.42
7.0.30.0180.03717.41
7.0.20.0100.03517.60
7.0.10.0030.03717.47
7.0.00.0020.03117.45
5.6.400.0070.00715.77
5.6.390.0070.00716.12
5.6.380.0080.00815.77
5.6.370.0070.00315.98
5.6.360.0100.00715.92
5.6.350.0030.01216.03
5.6.340.0070.00715.96
5.6.330.0120.00616.17
5.6.320.0040.01115.72
5.6.310.0030.01015.73
5.6.300.0040.01416.06
5.6.290.0090.00615.67
5.6.280.0040.04218.49
5.6.270.0000.01516.09
5.6.260.0000.01215.87
5.6.250.0100.00716.07
5.6.240.0100.00015.85
5.6.230.0060.00615.74
5.6.220.0070.01015.87
5.6.210.0070.04318.35
5.6.200.0090.04517.10
5.6.190.0100.04717.99
5.6.180.0280.02318.25
5.6.170.0100.02918.20
5.6.160.0060.02318.30
5.6.150.0100.03617.06
5.6.140.0080.02116.98
5.6.130.0030.03017.05
5.6.120.0100.04018.49
5.6.110.0030.05018.39
5.6.100.0090.04118.47
5.6.90.0080.04818.55
5.6.80.0090.02818.14
5.6.70.0080.00816.03
5.6.60.0060.01015.72
5.6.50.0030.00615.86
5.6.40.0030.01015.55
5.6.30.0120.00315.84
5.6.20.0070.01015.90
5.6.10.0000.01115.75
5.6.00.0040.00815.66
5.5.380.0110.00715.87
5.5.370.0000.01115.75
5.5.360.0070.01015.81
5.5.350.0150.04318.02
5.5.340.0030.03016.75
5.5.330.0030.03418.06
5.5.320.0030.04117.86
5.5.310.0100.03818.05
5.5.300.0060.02516.89
5.5.290.0030.02516.78
5.5.280.0020.04518.42
5.5.270.0050.03018.30
5.5.260.0070.02818.17
5.5.250.0090.04418.14
5.5.240.0060.03117.79
5.5.230.0060.00915.60
5.5.220.0070.01015.74
5.5.210.0060.00615.82
5.5.200.0070.00715.55
5.5.190.0090.00615.70
5.5.180.0040.01115.83
5.5.170.0000.01215.56
5.5.160.0100.00615.59
5.5.150.0070.00315.57
5.5.140.0070.00715.89
5.5.130.0090.00615.85
5.5.120.0060.00615.84
5.5.110.0070.00715.67
5.5.100.0060.00315.50
5.5.90.0130.00315.76
5.5.80.0130.00015.70
5.5.70.0080.00315.78
5.5.60.0060.00915.56
5.5.50.0100.00715.58
5.5.40.0030.01015.60
5.5.30.0000.01115.55
5.5.20.0070.00715.50
5.5.10.0060.00315.76
5.5.00.0000.01115.67
5.4.450.0130.03016.73
5.4.440.0320.04416.77
5.4.430.0400.02916.60
5.4.420.0330.03316.73
5.4.410.0350.03316.59
5.4.400.0350.03016.58
5.4.390.0320.03316.47
5.4.380.0300.03016.43
5.4.370.0350.03616.65
5.4.360.0280.03516.44
5.4.350.0330.03016.43
5.4.340.0330.02816.58
5.4.330.0030.00813.98
5.4.320.0380.02516.50
5.4.310.0360.02816.58
5.4.300.0350.03316.62
5.4.290.0390.03116.60
5.4.280.0350.02316.57
5.4.270.0390.03216.65
5.4.260.0400.02216.60
5.4.250.0370.02916.60
5.4.240.0330.02916.54
5.4.230.0350.02916.57
5.4.220.0350.03116.65
5.4.210.0230.03616.50
5.4.200.0360.03015.36
5.4.190.0330.02916.44
5.4.180.0340.03216.58
5.4.170.0350.03116.62
5.4.160.0420.02316.57
5.4.150.0410.02616.47
5.4.140.0380.02515.30
5.4.130.0230.03415.33
5.4.120.0340.02715.14
5.4.110.0340.02415.31
5.4.100.0320.03315.26
5.4.90.0270.03015.14
5.4.80.0310.03015.21
5.4.70.0380.02615.16
5.4.60.0370.02715.10
5.4.50.0390.02215.22
5.4.40.0380.02315.18
5.4.30.0300.03115.20
5.4.20.0320.02815.20
5.4.10.0380.02415.29
5.4.00.0320.03215.04
5.3.290.0730.04714.75
5.3.280.0600.05014.59
5.3.270.0670.04314.58
5.3.260.0670.06014.84
5.3.250.0570.05314.58
5.3.240.0670.05314.70
5.3.230.0600.05014.68
5.3.220.0630.04714.55
5.3.210.0630.04714.54
5.3.200.0570.05014.59
5.3.190.0500.05714.64
5.3.180.0530.06014.49
5.3.170.0700.05314.61
5.3.160.0700.04014.55
5.3.150.0630.04714.74
5.3.140.0570.05714.70
5.3.130.0630.05314.62
5.3.120.0630.05314.68
5.3.110.0800.04714.69
5.3.100.0770.05314.17
5.3.90.0770.05313.99
5.3.80.0670.05014.23
5.3.70.0630.05314.07
5.3.60.0630.05014.09
5.3.50.0670.05714.14
5.3.40.0730.04714.05
5.3.30.0770.06013.98
5.3.20.0600.05013.67
5.3.10.0700.04313.83
5.3.00.0630.04313.72
5.2.170.0430.04311.16
5.2.160.0530.04311.05
5.2.150.0530.04311.14
5.2.140.0530.04311.07
5.2.130.0500.04311.08
5.2.120.0570.03711.07
5.2.110.0530.04011.05
5.2.100.0630.03311.25
5.2.90.0630.03011.02
5.2.80.0700.04011.05
5.2.70.0870.04011.01
5.2.60.0730.05311.04
5.2.50.0470.04011.18
5.2.40.0330.04711.15
5.2.30.0400.03711.14
5.2.20.0370.04010.86
5.2.10.0470.03310.72
5.2.00.0500.03710.79
5.1.60.0400.0409.93
5.1.50.0500.03010.16
5.1.40.0430.0339.88
5.1.30.0470.03010.45
5.1.20.0530.02710.39
5.1.10.0470.03010.11
5.1.00.0500.0309.93
5.0.50.0330.0208.68
5.0.40.0200.0308.48
5.0.30.0300.0378.33
5.0.20.0230.0278.30
5.0.10.0300.0208.09
5.0.00.0200.0438.02
4.4.90.0200.0235.85
4.4.80.0230.0235.84
4.4.70.0200.0235.84
4.4.60.0230.0175.77
4.4.50.0170.0235.74
4.4.40.0270.0275.86
4.4.30.0170.0235.82
4.4.20.0230.0175.81
4.4.10.0200.0205.96
4.4.00.0230.0335.77
4.3.110.0270.0175.70
4.3.100.0270.0205.68
4.3.90.0200.0235.83
4.3.80.0300.0275.80
4.3.70.0330.0235.78
4.3.60.0230.0275.78
4.3.50.0230.0235.66
4.3.40.0270.0275.74
4.3.30.0070.0274.45
4.3.20.0170.0234.58
4.3.10.0130.0274.34
4.3.00.0030.0237.51

preferences:
55.22 ms | 400 KiB | 5 Q