3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo PHP_VERSION; class Test { public $foo = 1; public $bar = 2; public function test() { $class = new ReflectionClass(get_class($this)); $names = array(); foreach($class->getProperties() as $property) { $names[] = $property->getName(); // This code works: // $names[] = $property->name; } return $names; } } $test = new Test(); var_dump($test->test());

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.60.0150.00016.50
8.3.50.0080.01022.18
8.3.40.0070.00719.02
8.3.30.0110.00319.08
8.3.20.0060.00320.34
8.3.10.0080.00023.61
8.3.00.0040.00420.67
8.2.180.0090.00618.17
8.2.170.0110.00722.96
8.2.160.0110.00322.11
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0050.00320.52
8.2.110.0030.00721.03
8.2.100.0080.00417.64
8.2.90.0030.00619.21
8.2.80.0050.00318.05
8.2.70.0030.00517.61
8.2.60.0000.01117.65
8.2.50.0000.00818.07
8.2.40.0000.00818.27
8.2.30.0080.00018.20
8.2.20.0040.00417.61
8.2.10.0020.00517.66
8.2.00.0040.00417.80
8.1.280.0090.00925.92
8.1.270.0080.00023.97
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.98
8.1.230.0060.00620.92
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0040.00417.53
8.1.180.0030.00618.10
8.1.170.0080.00018.65
8.1.160.0000.00721.93
8.1.150.0040.00418.64
8.1.140.0050.00217.33
8.1.130.0000.00717.80
8.1.120.0000.00817.47
8.1.110.0000.00817.36
8.1.100.0000.00717.50
8.1.90.0000.00717.45
8.1.80.0050.00317.51
8.1.70.0080.00017.43
8.1.60.0000.00917.59
8.1.50.0060.00317.42
8.1.40.0040.00417.52
8.1.30.0090.00017.55
8.1.20.0040.00417.66
8.1.10.0040.00717.55
8.1.00.0000.00717.50
8.0.300.0020.00518.77
8.0.290.0000.00717.05
8.0.280.0000.00818.45
8.0.270.0050.00217.27
8.0.260.0030.00316.82
8.0.250.0000.00717.00
8.0.240.0040.00416.95
8.0.230.0050.00316.96
8.0.220.0030.00316.91
8.0.210.0000.00716.79
8.0.200.0030.00316.93
8.0.190.0080.00016.95
8.0.180.0030.00516.95
8.0.170.0050.00316.89
8.0.160.0040.00416.92
8.0.150.0050.00216.85
8.0.140.0000.00716.84
8.0.130.0000.00613.34
8.0.120.0000.00816.88
8.0.110.0040.00416.84
8.0.100.0000.00816.92
8.0.90.0080.00016.86
8.0.80.0040.01116.96
8.0.70.0060.00316.93
8.0.60.0000.00817.02
8.0.50.0000.00716.68
8.0.30.0120.00717.32
8.0.20.0050.01317.40
8.0.10.0050.00317.08
8.0.00.0070.01016.70
7.4.330.0030.00315.00
7.4.320.0040.00416.49
7.4.300.0030.00316.37
7.4.290.0000.00616.50
7.4.280.0070.00416.55
7.4.270.0070.00016.58
7.4.260.0050.00316.64
7.4.250.0040.00416.52
7.4.240.0020.00616.58
7.4.230.0000.00816.71
7.4.220.0090.01316.66
7.4.210.0070.00916.56
7.4.200.0030.00316.64
7.4.190.0030.00616.75
7.4.160.0090.00616.39
7.4.150.0070.01117.40
7.4.140.0050.01517.86
7.4.130.0130.00816.63
7.4.120.0080.00816.48
7.4.110.0110.00816.55
7.4.100.0130.00516.60
7.4.90.0060.01216.44
7.4.80.0090.00916.24
7.4.70.0030.01516.52
7.4.60.0130.00316.63
7.4.50.0060.00316.52
7.4.40.0120.00322.77
7.4.30.0040.01316.55
7.4.00.0070.00715.25
7.3.330.0050.00013.21
7.3.320.0000.00613.23
7.3.310.0000.00716.27
7.3.300.0000.00716.38
7.3.290.0110.00316.34
7.3.280.0100.00916.37
7.3.270.0140.00317.40
7.3.260.0130.00616.38
7.3.250.0100.00716.44
7.3.240.0070.01116.59
7.3.230.0130.00316.39
7.3.210.0100.00716.53
7.3.200.0030.01419.39
7.3.190.0000.01616.19
7.3.180.0030.01616.61
7.3.170.0100.00616.35
7.3.160.0120.00316.44
7.3.120.0140.00014.86
7.3.00.0020.01016.61
7.2.330.0000.01816.75
7.2.320.0060.01316.63
7.2.310.0140.00516.80
7.2.300.0060.01016.87
7.2.290.0100.00716.81
7.2.130.0030.00916.80
7.2.120.0070.00717.07
7.2.110.0070.01016.82
7.2.100.0040.01116.78
7.2.90.0090.00616.84
7.2.80.0120.00616.80
7.2.70.0080.00816.99
7.2.60.0060.00816.76
7.2.50.0070.01116.89
7.2.40.0140.00016.59
7.2.30.0090.00317.04
7.2.20.0070.00716.81
7.2.10.0090.00016.85
7.2.00.0090.00518.17
7.1.250.0060.00915.52
7.1.240.0100.00315.68
7.1.230.0120.00015.57
7.1.220.0070.00715.55
7.1.210.0100.00315.32
7.1.200.0050.01115.63
7.1.190.0070.00715.46
7.1.180.0030.00715.81
7.1.170.0070.00715.54
7.1.160.0070.00615.74
7.1.150.0000.00915.55
7.1.140.0090.00015.56
7.1.130.0070.01015.87
7.1.120.0090.00615.38
7.1.110.0080.00815.76
7.1.100.0030.01016.81
7.1.90.0060.00615.71
7.1.80.0060.00615.78
7.1.70.0020.01316.39
7.1.60.0090.00917.52
7.1.50.0050.01216.13
7.1.40.0000.01515.34
7.1.30.0040.01115.41
7.1.20.0080.00815.71
7.1.10.0090.00615.64
7.1.00.0080.03719.06
7.0.330.0040.00915.22
7.0.320.0100.00615.06
7.0.310.0090.00615.20
7.0.300.0060.01315.44
7.0.290.0090.00615.37
7.0.280.0070.00715.13
7.0.270.0040.01115.42
7.0.260.0040.00415.45
7.0.250.0030.00715.48
7.0.240.0050.00815.35
7.0.230.0070.01115.39
7.0.220.0110.00415.44
7.0.210.0040.01115.42
7.0.200.0060.00516.02
7.0.190.0070.01115.12
7.0.180.0030.01015.39
7.0.170.0000.01415.28
7.0.160.0110.00715.32
7.0.150.0000.00815.13
7.0.140.0080.03518.60
7.0.130.0000.01415.47
7.0.120.0060.00615.33
7.0.110.0000.01515.27
7.0.100.0090.00615.36
7.0.90.0140.00015.05
7.0.80.0150.02017.65
7.0.70.0080.04517.69
7.0.60.0050.02317.67
7.0.50.0050.02517.86
7.0.40.0040.02016.70
7.0.30.0050.04516.86
7.0.20.0080.04016.79
7.0.10.0130.03716.77
7.0.00.0070.04116.70
5.6.380.0060.00914.06
5.6.370.0130.00614.43
5.6.360.0060.00314.47
5.6.350.0000.01114.39
5.6.340.0030.00714.51
5.6.330.0070.00414.54
5.6.320.0030.00914.41
5.6.310.0100.00314.54
5.6.300.0030.01014.14
5.6.290.0030.01014.50
5.6.280.0060.03817.69
5.6.270.0100.00314.59
5.6.260.0060.00614.24
5.6.250.0100.00314.33
5.6.240.0090.00314.15
5.6.230.0050.04717.29
5.6.220.0020.03117.30
5.6.210.0040.02517.42
5.6.200.0080.03617.66
5.6.190.0050.02317.73
5.6.180.0090.04317.63
5.6.170.0070.03817.74
5.6.160.0050.04517.60
5.6.150.0040.02517.68
5.6.140.0070.02717.69
5.6.130.0070.04217.75
5.6.120.0050.04517.88
5.6.110.0050.03117.76
5.6.100.0000.04817.64
5.6.90.0020.05217.59
5.6.80.0030.02417.34
5.6.70.0120.02717.30
5.6.60.0100.04417.43
5.6.50.0020.03817.41
5.6.40.0110.03817.28
5.6.30.0030.04217.42
5.6.20.0020.02217.30
5.6.10.0020.02217.22
5.6.00.0050.04217.34
5.5.380.0090.00011.18
5.5.370.0030.04415.82
5.5.360.0070.04115.80
5.5.350.0080.02015.79
5.5.340.0060.02916.08
5.5.330.0060.03015.99
5.5.320.0050.02216.05
5.5.310.0090.04116.20
5.5.300.0020.03116.00
5.5.290.0030.02315.99
5.5.280.0030.03216.04
5.5.270.0050.03315.90
5.5.260.0100.04016.02
5.5.250.0020.02215.90
5.5.240.0070.04015.78
5.5.230.0050.04015.73
5.5.220.0020.02515.65
5.5.210.0050.02015.79
5.5.200.0100.03515.66
5.5.190.0050.03215.71
5.5.180.0050.01715.65
5.5.170.0000.00611.23
5.5.160.0050.02715.80
5.5.150.0060.02015.71
5.5.140.0100.03115.70
5.5.130.0020.04315.70
5.5.120.0070.04015.68
5.5.110.0000.03015.68
5.5.100.0070.03015.63
5.5.90.0080.04215.58
5.5.80.0030.02415.63
5.5.70.0050.03715.63
5.5.60.0020.04015.66
5.5.50.0070.01515.65
5.5.40.0020.02215.65
5.5.30.0050.02115.72
5.5.20.0050.01715.63
5.5.10.0050.04215.64
5.5.00.0100.03715.60
5.4.450.0080.03815.20
5.4.440.0040.04315.37
5.4.430.0070.03915.31
5.4.420.0030.04415.36
5.4.410.0000.04015.19
5.4.400.0030.04015.04
5.4.390.0050.03815.04
5.4.380.0050.03015.06
5.4.370.0050.02615.10
5.4.360.0030.02015.04
5.4.350.0050.02515.11
5.4.340.0100.01515.06
5.4.330.0040.00811.18
5.4.320.0050.04015.04
5.4.310.0030.02515.11
5.4.300.0080.04015.22
5.4.290.0020.04315.24
5.4.280.0060.01815.22
5.4.270.0030.04015.15
5.4.260.0020.02215.15
5.4.250.0050.03715.03
5.4.240.0030.04115.15
5.4.230.0050.01915.03
5.4.220.0020.02115.01
5.4.210.0050.01815.11
5.4.200.0070.01515.04
5.4.190.0020.02515.13
5.4.180.0120.02815.06
5.4.170.0050.01715.10
5.4.160.0040.02915.18
5.4.150.0020.04015.09
5.4.140.0030.02513.71
5.4.130.0050.02013.80
5.4.120.0030.02113.71
5.4.110.0080.03513.78
5.4.100.0050.03913.82
5.4.90.0060.02313.76
5.4.80.0080.03713.79
5.4.70.0070.02413.81
5.4.60.0040.03613.83
5.4.50.0050.04113.79
5.4.40.0030.04013.84
5.4.30.0050.01813.76
5.4.20.0050.03213.82
5.4.10.0000.03713.81
5.4.00.0100.03313.54
5.3.290.0030.02912.97
5.3.280.0020.03312.87
5.3.270.0080.01512.94
5.3.260.0080.03512.91
5.3.250.0030.03812.85
5.3.240.0000.02312.90
5.3.230.0030.02312.89
5.3.220.0040.02212.92
5.3.210.0000.02512.93
5.3.200.0080.04112.93
5.3.190.0030.02612.93
5.3.180.0000.03112.90
5.3.170.0020.02612.83
5.3.160.0070.03212.85
5.3.150.0020.02912.83
5.3.140.0030.02312.88
5.3.130.0030.04012.84
5.3.120.0050.04012.84
5.3.110.0050.02212.82
5.3.100.0060.04012.66
5.3.90.0000.02812.61
5.3.80.0070.02012.55
5.3.70.0000.03012.66
5.3.60.0070.02612.65
5.3.50.0010.02812.57
5.3.40.0050.01812.63
5.3.30.0030.02712.50
5.3.20.0030.02912.46
5.3.10.0020.01912.47
5.3.00.0030.04512.47
5.2.170.0020.03211.42
5.2.160.0030.01311.42
5.2.150.0060.02811.42
5.2.140.0040.03011.42
5.2.130.0050.03011.42
5.2.120.0040.03511.42
5.2.110.0040.03111.42
5.2.100.0000.02011.42
5.2.90.0000.01911.42
5.2.80.0030.01611.42
5.2.70.0000.02211.42
5.2.60.0050.01711.42
5.2.50.0040.01611.42
5.2.40.0000.01811.42
5.2.30.0010.02111.42
5.2.20.0030.01511.42
5.2.10.0080.02111.42
5.2.00.0030.02011.42
5.1.60.0050.02511.42
5.1.50.0020.02711.42
5.1.40.0030.01311.42
5.1.30.0090.02511.42
5.1.20.0090.02011.42
5.1.10.0020.01811.42
5.1.00.0050.00811.42
5.0.50.0020.02511.42
5.0.40.0000.01711.42
5.0.30.0040.02011.42
5.0.20.0030.02211.42
5.0.10.0030.02211.42
5.0.00.0000.01911.42
4.4.90.0020.01011.42
4.4.80.0020.00811.42
4.4.70.0030.01811.42
4.4.60.0030.01811.42
4.4.50.0000.01711.42
4.4.40.0010.02011.42
4.4.30.0020.01011.42
4.4.20.0050.00511.42
4.4.10.0000.01311.42
4.4.00.0010.02011.42
4.3.110.0020.02011.42
4.3.100.0000.01211.42
4.3.90.0000.01311.42
4.3.80.0030.01011.42
4.3.70.0020.00711.42
4.3.60.0030.01311.42
4.3.50.0030.01411.42
4.3.40.0010.01711.42
4.3.30.0000.01111.42
4.3.20.0020.01511.42
4.3.10.0020.00811.42
4.3.00.0060.01411.42

preferences:
43.45 ms | 401 KiB | 5 Q