3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { const VERSION_INFO = '12abc34 (HEAD -> master, tag: 2.0.1)'; static function getVersion(): string { if (self::VERSION_INFO[0] === '$') { // fallback to other methods return ''; } if (preg_match('/^([0-9a-f]+).*?tag: ([\d\.]+)/', self::VERSION_INFO, $matched)) { return "{$matched[2]}-{$matched[1]}"; } // fallback to other methods } } var_dump(Foo::getVersion());

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.80.0100.00018.34
8.3.70.0120.00316.50
8.3.60.0110.00418.80
8.3.50.0070.01017.63
8.3.40.0100.00719.04
8.3.30.0120.00319.01
8.3.20.0080.00020.95
8.3.10.0040.00421.58
8.3.00.0090.00020.77
8.2.200.0040.00418.66
8.2.190.0100.00316.63
8.2.180.0130.00316.75
8.2.170.0150.00022.96
8.2.160.0110.00420.52
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0090.00019.89
8.2.120.0000.00726.35
8.2.110.0090.00919.33
8.2.100.0080.00419.82
8.2.90.0030.00617.75
8.2.80.0050.00319.04
8.2.70.0030.00617.80
8.2.60.0080.00018.22
8.2.50.0040.00418.10
8.2.40.0000.00819.52
8.2.30.0040.00419.34
8.2.20.0000.00718.05
8.2.10.0050.00219.33
8.2.00.0060.00317.95
8.1.290.0030.00630.84
8.1.280.0110.00725.92
8.1.270.0030.00622.06
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00919.53
8.1.230.0040.00817.71
8.1.220.0080.00017.74
8.1.210.0050.00518.77
8.1.200.0090.00017.36
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0060.00318.84
8.1.160.0030.00418.97
8.1.150.0060.00318.72
8.1.140.0070.00018.97
8.1.130.0040.00417.48
8.1.120.0000.00817.47
8.1.110.0050.00317.52
8.1.100.0000.00717.39
8.1.90.0000.00717.44
8.1.80.0040.00417.54
8.1.70.0040.00417.48
8.1.60.0040.00417.66
8.1.50.0050.00317.55
8.1.40.0030.00517.51
8.1.30.0030.00617.61
8.1.20.0030.00517.79
8.1.10.0030.00617.69
8.1.00.0020.00517.45
8.0.300.0070.00018.77
8.0.290.0000.00916.88
8.0.280.0000.00818.50
8.0.270.0000.00718.15
8.0.260.0040.00416.91
8.0.250.0040.00417.05
8.0.240.0000.00717.06
8.0.230.0070.00017.06
8.0.220.0050.00217.11
8.0.210.0040.00417.09
8.0.200.0000.00717.13
8.0.190.0060.00317.03
8.0.180.0000.00717.16
8.0.170.0080.00017.12
8.0.160.0040.00417.16
8.0.150.0040.00817.08
8.0.140.0000.00817.13
8.0.130.0030.00313.45
8.0.120.0040.00417.12
8.0.110.0070.00017.12
8.0.100.0040.00417.04
8.0.90.0040.00417.08
8.0.80.0100.00717.04
8.0.70.0040.00417.16
8.0.60.0000.00816.90
8.0.50.0080.00017.13
8.0.30.0090.01117.46
8.0.20.0110.01017.27
8.0.10.0070.00016.98
8.0.00.0140.01116.79
7.4.330.0000.00415.55
7.4.320.0060.00016.64
7.4.300.0060.00016.79
7.4.290.0070.00016.64
7.4.280.0040.00416.79
7.4.270.0040.00416.64
7.4.260.0050.00316.64
7.4.250.0070.00016.72
7.4.240.0070.00016.63
7.4.230.0080.00016.56
7.4.220.0050.00316.46
7.4.210.0070.00716.69
7.4.200.0030.00316.82
7.4.160.0090.00716.62
7.4.140.0160.00317.86
7.4.130.0180.00616.70
7.4.120.0160.00016.47
7.4.110.0070.01016.71
7.4.100.0140.00916.73
7.4.90.0150.00616.51
7.4.80.0120.01119.39
7.4.70.0090.00716.58
7.4.60.0060.00916.78
7.4.50.0110.00416.50
7.4.40.0120.00616.68
7.4.00.0070.01015.32
7.3.330.0000.00713.58
7.3.320.0000.00613.58
7.3.310.0000.00716.33
7.3.300.0070.00016.43
7.3.290.0040.00416.58
7.3.280.0100.00816.53
7.3.260.0110.01216.63
7.3.240.0080.01016.60
7.3.230.0180.02516.74
7.3.210.0070.01016.73
7.3.200.0030.01616.54
7.3.190.0100.00716.81
7.3.180.0000.01816.42
7.3.170.0070.01016.64
7.3.160.0110.01116.68
7.3.40.0070.01215.07
7.3.30.0120.00815.02
7.3.20.0030.01016.50
7.3.10.0120.00916.55
7.3.00.0140.00716.88
7.2.330.0130.00616.87
7.2.320.0090.01216.80
7.2.310.0060.01516.87
7.2.300.0100.01316.86
7.2.290.0120.00616.68
7.2.170.0030.01815.28
7.2.160.0100.00714.75
7.2.150.0130.00617.03
7.2.140.0090.01716.82
7.2.130.0100.00716.89
7.2.120.0140.00717.13
7.2.110.0120.00317.02
7.2.100.0000.01217.06
7.2.90.0030.00716.92
7.2.80.0080.01516.92
7.2.70.0030.00716.86
7.2.60.0030.00716.79
7.2.50.0090.01116.73
7.2.40.0180.00416.85
7.2.30.0030.01017.07
7.2.20.0090.00316.92
7.2.10.0110.01217.00
7.2.00.0170.00617.08
7.1.280.0110.00815.90
7.1.270.0110.00315.63
7.1.260.0140.00715.91
7.1.250.0070.01415.90

preferences:
27.65 ms | 401 KiB | 5 Q