3v4l.org

run code in 300+ PHP versions simultaneously
<?php class social_button { private function social_facebook() { return 'Facebook'; } private function social_instagram() { return 'Instagram'; } private function social_twitter() { return 'Twitter'; } public function all() { $reflection = new \ReflectionObject($this); $prefix = 'social_'; $methods = array_filter($reflection->getMethods(), function (\ReflectionMethod $method) use ($prefix) { return 0 === strpos($method->getName(), $prefix); }); $results = array_map(function (\ReflectionMethod $method) { $name = $method->getName(); return $this->$name(); }, $methods); return $results; } } $button = new social_button(); var_dump($button->all());

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.5.00.0120.00920.11
8.4.150.0030.00014.05
8.4.140.0200.00617.60
8.4.130.0090.00517.85
8.4.120.0140.00620.63
8.4.110.0130.00718.75
8.4.100.0100.01517.69
8.4.90.0110.00818.52
8.4.80.0110.00617.83
8.4.70.0110.00917.68
8.4.60.0040.00620.81
8.4.50.0040.00617.96
8.4.40.0040.00719.22
8.4.30.0030.00719.49
8.4.20.0030.01717.79
8.4.10.0090.01219.55
8.3.280.0140.00618.46
8.3.270.0110.01016.60
8.3.260.0120.00716.43
8.3.250.0100.00918.80
8.3.240.0130.00716.55
8.3.230.0060.00316.62
8.3.220.0140.00618.98
8.3.210.0030.00416.70
8.3.200.0020.00716.67
8.3.190.0070.00517.14
8.3.180.0040.00416.36
8.3.170.0180.00017.04
8.3.160.0090.00918.40
8.3.150.0150.00420.54
8.3.140.0000.00918.40
8.3.130.0060.00316.49
8.3.120.0100.01018.99
8.3.110.0100.00620.94
8.3.100.0060.00324.06
8.3.90.0060.01218.43
8.3.80.0060.00319.36
8.3.70.0070.00718.28
8.3.60.0080.00818.43
8.3.50.0100.01016.40
8.3.40.0160.00018.79
8.3.30.0120.00318.84
8.3.20.0000.00720.41
8.3.10.0040.00422.08
8.3.00.0080.00019.56
8.2.290.0090.01020.59
8.2.280.0100.01018.30
8.2.270.0110.00419.04
8.2.260.0070.00718.57
8.2.250.0130.00316.81
8.2.240.0090.00018.96
8.2.230.0090.00022.58
8.2.220.0130.00337.54
8.2.210.0060.01326.77
8.2.200.0030.00618.41
8.2.190.0120.00618.26
8.2.180.0110.01118.38
8.2.170.0120.00322.96
8.2.160.0070.00719.40
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00320.38
8.2.120.0050.00326.35
8.2.110.0030.00720.92
8.2.100.0040.00717.72
8.2.90.0060.00319.23
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0040.00417.91
8.2.50.0000.00818.10
8.2.40.0040.00420.55
8.2.30.0070.00019.28
8.2.20.0040.00418.05
8.2.10.0080.00018.12
8.2.00.0040.00418.01
8.1.330.0100.01021.74
8.1.320.0140.00516.06
8.1.310.0000.00816.57
8.1.300.0100.00318.29
8.1.290.0030.00718.88
8.1.280.0130.00325.92
8.1.270.0000.00822.20
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0040.00423.83
8.1.230.0040.00719.14
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0060.00317.35
8.1.190.0000.00817.22
8.1.180.0000.00818.10
8.1.170.0040.00418.61
8.1.160.0030.00319.01
8.1.150.0000.00718.95
8.1.140.0040.00419.63
8.1.130.0040.00420.68
8.1.120.0040.00417.48
8.1.110.0040.00417.42
8.1.100.0000.00717.51
8.1.90.0040.00417.37
8.1.80.0060.00317.42
8.1.70.0030.00517.49
8.1.60.0050.00317.63
8.1.50.0000.00817.57
8.1.40.0000.00917.53
8.1.30.0050.00317.58
8.1.20.0090.00017.56
8.1.10.0060.00317.61
8.1.00.0000.00817.60
8.0.300.0060.00318.77
8.0.290.0000.00916.75
8.0.280.0030.00318.34
8.0.270.0030.00317.28
8.0.260.0030.00319.00
8.0.250.0000.00717.05
8.0.240.0040.00416.87
8.0.230.0040.00416.99
8.0.220.0040.00416.99
8.0.210.0000.00716.83
8.0.200.0030.00316.91
8.0.190.0030.00617.07
8.0.180.0000.00916.99
8.0.170.0000.00716.86
8.0.160.0050.00516.90
8.0.150.0070.00016.84
8.0.140.0050.00316.93
8.0.130.0050.00013.39
8.0.120.0070.00316.84
8.0.110.0050.00316.83
8.0.100.0000.00816.95
8.0.90.0000.00717.00
8.0.80.0090.00616.93
8.0.70.0040.00416.95
8.0.60.0030.00516.79
8.0.50.0050.00216.84
8.0.30.0120.00517.27
8.0.20.0140.00617.40
8.0.10.0030.00616.96
8.0.00.0160.01016.60
7.4.330.0000.00515.55
7.4.320.0000.00616.61
7.4.300.0040.00416.52
7.4.290.0060.00316.67
7.4.280.0070.00316.51
7.4.270.0040.00416.47
7.4.260.0000.00716.52
7.4.250.0000.00716.47
7.4.240.0070.00016.62
7.4.230.0000.00716.61
7.4.220.0070.00716.61
7.4.210.0120.00916.55
7.4.200.0030.00316.59
7.4.160.0100.00616.49
7.4.150.0080.01117.40
7.4.140.0050.01417.86
7.4.130.0120.00616.39
7.4.120.0070.01416.60
7.4.110.0070.01016.49
7.4.100.0090.00916.48
7.4.90.0080.00816.39
7.4.80.0060.01019.39
7.4.70.0060.01216.73
7.4.60.0110.00516.65
7.4.50.0090.00616.45
7.4.40.0060.00916.58
7.4.30.0100.01316.49
7.4.00.0060.00815.02
7.3.330.0050.00013.33
7.3.320.0030.00313.23
7.3.310.0030.00516.20
7.3.300.0070.00016.27
7.3.290.0100.00816.25
7.3.280.0080.00816.31
7.3.270.0170.00017.40
7.3.260.0150.00316.60
7.3.250.0130.00816.43
7.3.240.0080.00916.43
7.3.230.0070.01016.36
7.3.210.0080.00816.25
7.3.200.0100.00716.40
7.3.190.0100.00616.47
7.3.180.0040.01116.36
7.3.170.0100.00616.64
7.3.160.0030.01416.31
7.2.330.0180.00016.68
7.2.320.0060.01016.77
7.2.310.0090.00916.74
7.2.300.0080.00816.71
7.2.290.0090.00916.77
7.2.60.0110.00416.77
7.1.200.0040.00815.73
7.1.80.3200.01016.24
7.1.70.3650.01015.13
7.1.60.3520.01633.17
7.1.50.3030.02332.90
7.1.40.3280.00732.53
7.1.30.3480.00632.91
7.1.20.2630.01332.60
7.1.10.2590.01014.76
7.1.00.2760.01314.74
7.0.200.4210.00815.03
7.0.190.3930.01214.88
7.0.180.3300.01114.21
7.0.170.3690.01014.52
7.0.160.3190.01014.43
7.0.150.2680.01014.30
7.0.140.2880.00614.64
7.0.130.2920.01314.66
7.0.120.3430.01114.71
7.0.110.2670.01014.41
7.0.100.2690.00614.46
7.0.90.2830.00914.36
7.0.80.2900.01414.49
7.0.70.2600.00714.54
7.0.60.2500.01514.07
7.0.50.2730.01314.54
7.0.40.2930.00214.38
7.0.30.2710.00914.52
7.0.20.2760.00714.32
7.0.10.2710.00914.58
7.0.00.2710.01214.46

preferences:
33.18 ms | 403 KiB | 5 Q