3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public function getName() { return "SomeName"; } } $result = [ 'command' => 'getName()' ]; $command = $result['command']; $command = str_replace('()','',$command); $user = new User(); echo $user->{$command}();

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.4.140.0140.01017.73
8.4.130.0100.00617.70
8.4.120.0120.00820.50
8.4.110.0060.00522.11
8.4.100.0130.00817.88
8.4.90.0130.00718.52
8.4.80.0030.00617.68
8.4.70.0070.00517.77
8.4.60.0130.00718.92
8.4.50.0130.00318.59
8.4.40.0120.00624.02
8.4.30.0160.00319.55
8.4.20.0100.01017.64
8.4.10.0030.00619.52
8.3.270.0150.00616.48
8.3.260.0120.00616.23
8.3.250.0150.00418.61
8.3.240.0150.00316.57
8.3.230.0090.00916.64
8.3.220.0090.00917.22
8.3.210.0100.01118.21
8.3.200.0040.00416.61
8.3.190.0090.00516.75
8.3.180.0060.00216.38
8.3.170.0110.00717.10
8.3.160.0060.01216.33
8.3.150.0080.01218.81
8.3.140.0160.00317.06
8.3.130.0070.00718.26
8.3.120.0030.00618.91
8.3.110.0090.00020.94
8.3.100.0030.00624.06
8.3.90.0050.00326.77
8.3.80.0060.00319.36
8.3.70.0160.00316.50
8.3.60.0140.00716.49
8.3.50.0070.01116.49
8.3.40.0090.00618.71
8.3.30.0000.01518.42
8.3.20.0000.00720.30
8.3.10.0040.00423.53
8.3.00.0050.00317.63
8.2.290.0090.00920.41
8.2.280.0120.00622.33
8.2.270.0110.00717.13
8.2.260.0050.00318.46
8.2.250.0080.00016.88
8.2.240.0030.00717.43
8.2.230.0060.00322.58
8.2.220.0100.00037.54
8.2.210.0040.00426.77
8.2.200.0090.00018.88
8.2.190.0140.00716.58
8.2.180.0070.01116.32
8.2.170.0120.00622.96
8.2.160.0110.00320.32
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00720.94
8.2.120.0000.00726.35
8.2.110.0090.00021.04
8.2.100.0080.00417.85
8.2.90.0030.00618.01
8.2.80.0000.00918.03
8.2.70.0030.00617.50
8.2.60.0040.00417.93
8.2.50.0000.00818.10
8.2.40.0040.00420.72
8.2.30.0030.00519.27
8.2.20.0040.00418.04
8.2.10.0040.00417.99
8.2.00.0040.00418.11
8.1.330.0110.00423.80
8.1.320.0150.00416.34
8.1.310.0050.00318.38
8.1.300.0090.00018.09
8.1.290.0030.00630.84
8.1.280.0100.00325.92
8.1.270.0070.01022.23
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0100.00022.64
8.1.230.0000.01120.86
8.1.220.0030.00617.77
8.1.210.0000.00818.77
8.1.200.0030.00617.10
8.1.190.0090.00017.10
8.1.180.0000.00818.10
8.1.170.0060.00318.57
8.1.160.0000.00819.05
8.1.150.0000.00720.61
8.1.140.0000.00719.51
8.1.130.0000.00818.88
8.1.120.0070.00017.43
8.1.110.0030.00517.38
8.1.100.0000.00817.40
8.1.90.0050.00217.37
8.1.80.0060.00317.29
8.1.70.0050.00317.42
8.1.60.0080.00017.54
8.1.50.0080.00017.54
8.1.40.0080.00017.53
8.1.30.0030.00617.54
8.1.20.0040.00417.56
8.1.10.0040.00417.57
8.1.00.0000.00817.49
8.0.300.0000.00720.09
8.0.290.0070.00016.63
8.0.280.0030.00518.43
8.0.270.0070.00017.34
8.0.260.0000.01016.87
8.0.250.0000.00816.93
8.0.240.0000.00816.92
8.0.230.0060.00316.91
8.0.220.0070.00016.75
8.0.210.0000.00716.84
8.0.200.0030.00316.90
8.0.190.0040.00416.91
8.0.180.0030.00616.85
8.0.170.0040.00316.84
8.0.160.0040.00416.85
8.0.150.0070.00016.79
8.0.140.0080.00016.67
8.0.130.0030.00313.16
8.0.120.0000.00716.77
8.0.110.0040.00416.62
8.0.100.0040.00416.94
8.0.90.0040.00416.64
8.0.80.0070.01116.86
8.0.70.0000.00716.70
8.0.60.0040.00416.80
8.0.50.0080.00016.79
8.0.30.0120.00717.12
8.0.20.0130.00817.40
8.0.10.0040.00416.96
8.0.00.0070.01416.43
7.4.330.0000.00515.55
7.4.320.0030.00316.51
7.4.300.0030.00316.57
7.4.290.0030.00616.48
7.4.280.0040.00316.50
7.4.270.0030.00316.61
7.4.260.0000.00713.30
7.4.250.0040.00416.47
7.4.240.0000.00716.50
7.4.230.0030.00316.49
7.4.220.0120.01216.58
7.4.210.0080.00816.58
7.4.200.0040.00416.67
7.4.160.0120.00716.37
7.4.150.0070.01017.40
7.4.140.0100.00817.86
7.4.130.0110.01416.22
7.4.120.0060.01116.53
7.4.110.0040.01316.36
7.4.100.0110.00616.54
7.4.90.0070.01016.39
7.4.80.0110.00519.39
7.4.70.0090.00616.50
7.4.60.0070.01016.21
7.4.50.0060.00616.48
7.4.40.0090.00616.55
7.4.30.0140.00416.66
7.4.00.0100.00815.13
7.3.330.0070.00013.17
7.3.320.0050.00013.09
7.3.310.0050.00216.34
7.3.300.0060.00016.13
7.3.290.0030.00316.36
7.3.280.0070.01016.28
7.3.270.0120.00917.40
7.3.260.0100.00716.33
7.3.250.0080.01116.36
7.3.240.0060.01116.57
7.3.230.0060.01216.45
7.3.210.0100.00716.48
7.3.200.0110.00716.29
7.3.190.0060.00916.36
7.3.180.0130.00916.24
7.3.170.0160.00616.35
7.3.160.0060.01016.27
7.3.120.0040.01514.78
7.3.110.0060.01514.90
7.3.100.0080.00614.95
7.3.90.0090.00614.49
7.3.80.0060.00614.60
7.3.70.0080.00814.85
7.3.60.0030.01014.83
7.3.50.0130.00314.70
7.3.40.0060.00914.91
7.3.30.0040.01114.73
7.3.20.0000.00916.45
7.3.10.0070.00716.76
7.3.00.0060.00316.74
7.2.330.0140.00716.79
7.2.320.0030.01416.69
7.2.310.0120.01216.75
7.2.300.0100.01016.79
7.2.290.0140.00316.76
7.2.250.0070.01415.09
7.2.240.0080.01514.94
7.2.230.0030.00914.95
7.2.220.0040.01515.19
7.2.210.0000.01014.82
7.2.200.0070.00715.20
7.2.190.0050.00514.96
7.2.180.0060.01015.06
7.2.170.0090.00615.05
7.2.60.0090.00317.04
7.1.330.0030.01015.98
7.1.320.0040.00415.95
7.1.310.0100.00715.83
7.1.300.0040.00415.56
7.1.290.0030.00915.78
7.1.280.0080.00415.86
7.1.270.0040.00715.63
7.1.260.0040.01215.92
7.1.200.0000.01415.52
7.1.70.0110.00817.15
7.1.60.0230.01735.18
7.1.50.0220.01234.91
7.1.40.0420.01234.33
7.1.30.0280.01434.36
7.1.20.0170.02134.58
7.1.10.0090.01116.46
7.1.00.0060.01416.84
7.0.200.0030.01616.90
7.0.190.0070.01414.92
7.0.180.0140.00616.29
7.0.170.0100.00716.26
7.0.160.0070.01416.22
7.0.150.0080.01216.20
7.0.140.0110.00816.18
7.0.130.0100.00916.56
7.0.120.0100.01016.54
7.0.110.0150.00416.38
7.0.100.0110.00816.50
7.0.90.0120.00616.21
7.0.80.0030.01416.24
7.0.70.0110.00716.35
7.0.60.0160.00716.19
7.0.50.0220.01216.37
7.0.40.0100.00716.36
7.0.30.0080.00816.38
7.0.20.0040.01216.47
7.0.10.0050.01016.28
7.0.00.0030.01016.44

preferences:
134.94 ms | 403 KiB | 5 Q