3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $one = ''; public $two = ''; //Constructor public function __construct() { //Constructor } //print variable one public function echoOne() { echo $this->one."\n"; } //print variable two public function echoTwo() { echo $this->two."\n"; } } //Instantiate the object $a = new A(); //Instantiate the reflection object $reflector = new ReflectionClass('A'); //Now get all the properties from class A in to $properties array $properties = $reflector->getProperties(); $i =1; //Now go through the $properties array and populate each property foreach($properties as $property) { //Populating properties $a->{$property->getName()}=$i; //Invoking the method to print what was populated $a->{"echo".ucfirst($property->getName())}()."\n"; $i++; }

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.0120.00318.81
8.3.30.0070.00718.89
8.3.20.0070.00020.16
8.3.10.0040.00421.97
8.3.00.0040.00422.51
8.2.170.0100.01022.96
8.2.160.0070.00719.21
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0080.00026.16
8.2.120.0080.00019.23
8.2.110.0000.00920.52
8.2.100.0110.00017.66
8.2.90.0000.00819.22
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0050.00318.05
8.2.50.0030.00518.07
8.2.40.0040.00418.16
8.2.30.0040.00418.15
8.2.20.0030.00517.64
8.2.10.0000.00817.75
8.2.00.0100.00017.73
8.1.270.0080.00022.02
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0000.00920.92
8.1.230.0030.00917.42
8.1.220.0000.00817.75
8.1.210.0080.00018.77
8.1.200.0000.00917.13
8.1.190.0080.00017.53
8.1.180.0040.00418.74
8.1.170.0000.00818.32
8.1.160.0040.00422.19
8.1.150.0060.00318.55
8.1.140.0040.00417.41
8.1.130.0050.00217.70
8.1.120.0000.00717.50
8.1.110.0060.00317.50
8.1.100.0000.00817.30
8.1.90.0040.00417.51
8.1.80.0000.00717.50
8.1.70.0000.00717.44
8.1.60.0080.00017.62
8.1.50.0040.00417.50
8.1.40.0040.00417.48
8.1.30.0000.00717.55
8.1.20.0000.00817.56
8.1.10.0000.00817.55
8.1.00.0080.00017.53
8.0.300.0000.00818.77
8.0.290.0060.00316.63
8.0.280.0070.00018.45
8.0.270.0070.00017.18
8.0.260.0070.00016.78
8.0.250.0000.00716.99
8.0.240.0030.00616.92
8.0.230.0030.00316.91
8.0.220.0070.00016.87
8.0.210.0030.00316.80
8.0.200.0050.00316.84
8.0.190.0040.00416.97
8.0.180.0050.00316.81
8.0.170.0000.00716.81
8.0.160.0030.00516.91
8.0.150.0040.00416.88
8.0.140.0030.00616.75
8.0.130.0000.00613.32
8.0.120.0030.00616.84
8.0.110.0000.00716.78
8.0.100.0050.00316.71
8.0.90.0050.00316.78
8.0.80.0090.01216.88
8.0.70.0070.00016.88
8.0.60.0000.00716.80
8.0.50.0050.00216.95
8.0.30.0120.00717.18
8.0.20.0150.00317.40
8.0.10.0000.00716.98
8.0.00.0100.01016.73
7.4.330.0000.00515.00
7.4.320.0030.00316.59
7.4.300.0070.00016.50
7.4.290.0000.00716.49
7.4.280.0060.00016.58
7.4.270.0030.00316.57
7.4.260.0000.00816.61
7.4.250.0030.00316.52
7.4.240.0070.00016.50
7.4.230.0030.00316.54
7.4.220.0080.00916.70
7.4.210.0080.00716.59
7.4.200.0030.00316.54
7.4.190.0050.00216.56
7.4.160.0040.01216.63
7.4.150.0100.00717.40
7.4.140.0160.00917.86
7.4.130.0130.00616.53
7.4.120.0110.00816.56
7.4.110.0130.00616.64
7.4.100.0140.00316.68
7.4.90.0160.00016.64
7.4.80.0160.00619.39
7.4.70.0040.01416.48
7.4.60.0060.01216.48
7.4.50.0000.00816.54
7.4.40.0030.01422.77
7.4.30.0080.00816.34
7.4.00.0060.00914.96
7.3.330.0000.00513.17
7.3.320.0030.00313.07
7.3.310.0030.00316.13
7.3.300.0070.00016.21
7.3.290.0030.01016.28
7.3.280.0070.00816.33
7.3.270.0060.01217.40
7.3.260.0090.00916.47
7.3.250.0090.00816.50
7.3.240.0140.00416.75
7.3.230.0090.00916.60
7.3.210.0090.01216.46
7.3.200.0150.00419.39
7.3.190.0030.01616.66
7.3.180.0040.01116.57
7.3.170.0060.00916.64
7.3.160.0070.01116.31
7.3.120.0070.00714.60
7.2.330.0110.00716.74
7.2.320.0090.00916.92
7.2.310.0100.01316.66
7.2.300.0090.00916.75
7.2.290.0090.00916.54
7.2.120.0620.01014.77
7.2.110.0110.00514.76
7.2.100.0290.00714.74
7.2.90.0800.00914.88
7.2.80.0110.00714.64
7.2.70.0200.00814.64
7.2.60.0060.00815.96
7.2.50.0540.00014.67
7.2.40.0710.00714.96
7.2.30.0090.01014.90
7.2.20.0170.00415.16
7.2.10.0210.01314.78
7.2.00.0600.00715.09
7.1.240.0510.00713.86
7.1.230.0420.00613.98
7.1.220.0530.00613.96
7.1.210.0400.00413.78
7.1.200.0370.00314.64
7.1.190.0200.00913.51
7.1.180.0140.00713.66
7.1.170.0110.00713.89
7.1.160.0340.01513.87
7.1.150.0100.01013.84
7.1.140.0410.00313.93
7.1.130.0250.00613.74
7.1.120.0050.00813.63
7.1.110.0330.00713.94
7.1.100.0360.00013.99
7.1.90.0260.00413.84
7.1.80.0160.01313.94
7.1.70.0520.00315.50
7.1.60.0110.01516.83
7.1.50.0320.00715.36
7.1.40.0340.00613.94
7.1.30.0030.01713.81
7.1.20.0230.00813.89
7.1.10.0130.00613.94
7.1.00.0200.04218.09
7.0.320.0420.00413.67
7.0.310.0920.00313.61
7.0.300.0640.00413.66
7.0.290.0280.00613.57
7.0.280.0060.01113.46
7.0.270.0320.00813.64
7.0.260.0220.00313.54
7.0.250.0050.00913.45
7.0.240.0470.00313.36
7.0.230.0340.00913.34
7.0.220.0110.00713.35
7.0.210.0380.00713.23
7.0.200.0200.01115.03
7.0.190.0070.01013.00
7.0.180.0460.01213.31
7.0.170.0380.00513.20
7.0.160.0320.00413.16
7.0.150.0290.00313.23
7.0.140.0400.04017.90
7.0.130.0340.00313.48
7.0.120.0250.01413.53
7.0.110.0430.01213.55
7.0.100.0120.00513.38
7.0.90.0370.00612.93
7.0.80.0170.00613.32
7.0.70.0340.00613.36
7.0.60.0160.02816.49
7.0.50.0230.02315.67
7.0.40.0270.04516.82
7.0.30.0260.02516.85
7.0.20.0320.02216.71
7.0.10.0190.02816.86
7.0.00.0090.02416.70
5.6.380.0100.00714.36
5.6.370.0050.00914.47
5.6.360.0060.00614.57
5.6.350.0070.00714.31
5.6.340.0100.00314.63
5.6.330.0060.00614.36
5.6.320.0050.01014.37
5.6.310.0100.00714.09
5.6.300.0070.01014.29
5.6.290.0030.01414.69
5.6.280.0060.04117.73
5.6.270.0070.01014.05
5.6.260.0090.00514.09
5.6.250.0090.00414.12
5.6.240.0140.00314.14
5.6.230.0120.00314.09
5.6.220.0100.01014.25
5.6.210.0030.02817.19
5.6.200.0100.04016.39
5.6.190.0040.03517.36
5.6.180.0240.03817.34
5.6.170.0210.04317.27
5.6.160.0060.02417.44
5.6.150.0080.03015.89
5.6.140.0090.02016.19
5.6.130.0080.02216.06
5.6.120.0110.03017.42
5.6.110.0070.04917.50
5.6.100.0050.03617.39
5.6.90.0090.04217.47
5.6.80.0080.04217.33
5.6.70.0060.01114.06
5.6.60.0110.00414.21
5.6.50.0070.01113.84
5.6.40.0050.01014.07
5.6.30.0120.00613.64
5.6.20.0030.01214.13
5.6.10.0080.00814.20
5.6.00.0100.00814.12
5.5.380.0080.00710.77
5.5.370.0060.00610.92
5.5.360.0030.00710.82
5.5.350.0130.01715.81
5.5.340.0040.02414.33
5.5.330.0040.05015.63
5.5.320.0140.03815.59
5.5.310.0150.02815.56
5.5.300.0100.03914.24
5.5.290.0110.04214.34
5.5.280.0090.04015.75
5.5.270.0050.03215.79
5.5.260.0090.03415.88
5.5.250.0070.04015.60
5.5.240.0030.03915.59
5.5.230.0120.00010.68
5.5.220.0000.01110.97
5.5.210.0050.00510.79
5.5.200.0060.00610.90
5.5.190.0080.00510.52
5.5.180.0070.00210.84
5.5.170.0060.01213.83
5.5.160.0070.00710.59
5.5.150.0100.00411.00
5.5.140.0070.00510.76
5.5.130.0100.00011.18
5.5.120.0040.00810.95
5.5.110.0100.00711.16
5.5.100.0040.00910.89
5.5.90.0100.00310.90
5.5.80.0090.00310.68
5.5.70.0060.00610.79
5.5.60.0080.00211.11
5.5.50.0060.00310.68
5.5.40.0070.00411.01
5.5.30.0060.00310.89
5.5.20.0120.00310.79
5.5.10.0080.00411.05
5.5.00.0050.00810.61
5.4.450.0500.02515.29
5.4.440.0360.03515.07
5.4.430.0090.02915.26
5.4.420.0120.02615.19
5.4.410.0110.03414.86
5.4.400.0140.02214.62
5.4.390.0090.02814.80
5.4.380.0140.03614.75
5.4.370.0200.02814.76
5.4.360.0360.01814.64
5.4.350.0070.01911.45
5.4.340.0040.02411.26
5.4.330.0050.00510.60
5.4.320.0060.02411.65
5.4.310.0050.02411.64
5.4.300.0080.02611.60
5.4.290.0090.02511.73
5.4.280.0050.03011.43
5.4.270.0060.02411.52
5.4.260.0090.03915.05
5.4.250.0050.03214.85
5.4.240.0110.03614.83
5.4.230.0060.03114.98
5.4.220.0070.03314.99
5.4.210.0150.03014.72
5.4.200.0120.03714.74
5.4.190.0040.03714.91
5.4.180.0060.03114.85
5.4.170.0100.03614.65
5.4.160.0080.02814.59
5.4.150.0150.02514.68
5.4.140.0080.02813.52
5.4.130.0080.02813.70
5.4.120.0100.03713.67
5.4.110.0060.03813.55
5.4.100.0110.02813.61
5.4.90.0120.03413.74
5.4.80.0150.02613.64
5.4.70.0160.02513.66
5.4.60.0090.03613.73
5.4.50.0120.03213.65
5.4.40.0060.03113.41
5.4.30.0070.03713.77
5.4.20.0050.04213.90
5.4.10.0050.04213.77
5.4.00.0100.03413.37
5.3.290.0070.02211.69
5.3.280.0070.02712.58
5.3.270.0130.03312.70
5.3.260.0110.02412.71
5.3.250.0080.02812.60
5.3.240.0070.03212.46
5.3.230.0040.02812.61
5.3.220.0040.03312.54
5.3.210.0050.04512.48
5.3.200.0040.03912.39
5.3.190.0110.03612.42
5.3.180.0080.03812.46
5.3.170.0110.03312.62
5.3.160.0130.02912.58
5.3.150.0070.03512.72
5.3.140.0100.03212.63
5.3.130.0070.03212.61
5.3.120.0090.03112.62
5.3.110.0120.03812.62
5.3.100.0110.02912.40
5.3.90.0050.03012.29
5.3.80.0030.02912.13
5.3.70.0040.03712.20
5.3.60.0030.03412.38
5.3.50.0050.03412.10
5.3.40.0020.04112.28
5.3.30.0080.03112.15
5.3.20.0090.03412.08
5.3.10.0100.03012.08
5.3.00.0060.03011.95
5.2.170.0060.02510.36
5.2.160.0100.02610.36
5.2.150.0080.02010.34
5.2.140.0050.02310.17
5.2.130.0090.02110.22
5.2.120.0080.02510.37
5.2.110.0030.02310.19
5.2.100.0050.03110.41
5.2.90.0080.02310.21
5.2.80.0050.03610.27
5.2.70.0070.02310.35
5.2.60.0080.02610.11
5.2.50.0050.03010.16
5.2.40.0060.03010.27
5.2.30.0070.02910.19
5.2.20.0030.03110.12
5.2.10.0060.02810.10
5.2.00.0030.0329.99
5.1.60.0070.0239.65
5.1.50.0020.0209.66
5.1.40.0040.0269.63
5.1.30.0090.0249.78
5.1.20.0030.0229.82
5.1.10.0020.0239.69
5.1.00.0070.0189.76
5.0.50.0030.0228.96
5.0.40.0060.0188.79
5.0.30.0050.0238.76
5.0.20.0060.0158.68
5.0.10.0080.0158.69
5.0.00.0050.0288.69
4.4.90.0060.0158.38
4.4.80.0070.0128.38
4.4.70.0040.0158.38
4.4.60.0050.0158.38
4.4.50.0060.0108.38
4.4.40.0000.0288.38
4.4.30.0010.0188.38
4.4.20.0000.0158.38
4.4.10.0040.0128.38
4.4.00.0040.0178.38
4.3.110.0000.0168.38
4.3.100.0000.0148.38
4.3.90.0040.0138.38
4.3.80.0060.0178.38
4.3.70.0030.0158.38
4.3.60.0030.0128.38
4.3.50.0020.0148.38
4.3.40.0050.0178.38
4.3.30.0010.0168.38
4.3.20.0060.0128.38
4.3.10.0030.0108.38
4.3.00.0080.0117.85

preferences:
57.19 ms | 400 KiB | 5 Q