3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public const FILENAME_REGEX = <<<REGEX (("([^"]+)")|('([^']+)')|([\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7E]+)) REGEX; } echo Foo::FILENAME_REGEX.PHP_EOL; class Bar { public const FILENAME_REGEX = <<<REGEX (("([^"]+)")|('([^']+)')|([\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2E\\x30-\\x39\\x41-\\x5A\\x5E-\\x7E]+)) REGEX; } echo Bar::FILENAME_REGEX.PHP_EOL;

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.80.0120.00516.63
8.5.70.0070.00618.48
8.5.60.0080.00616.73
8.5.50.0050.00316.72
8.5.30.0090.00719.93
8.5.20.0110.00720.23
8.5.10.0080.00916.61
8.5.00.0070.01419.66
8.4.230.0160.00619.41
8.4.220.0140.00819.47
8.4.210.0140.00619.53
8.4.180.0130.00919.37
8.4.170.0140.00621.84
8.4.160.0130.00922.00
8.4.150.0070.00617.65
8.4.140.0170.00717.30
8.4.130.0100.01017.82
8.4.120.0100.01020.53
8.4.110.0060.00718.68
8.4.100.0070.01217.55
8.4.90.0090.01117.50
8.4.80.0120.00719.24
8.4.70.0060.00517.82
8.4.60.0340.01217.43
8.4.50.0340.01117.55
8.4.40.0410.00817.11
8.4.30.0380.01017.21
8.4.20.0440.00617.24
8.4.10.0450.00917.34
8.3.310.0050.00418.25
8.3.300.0080.01120.78
8.3.290.0090.01120.83
8.3.280.0070.00516.19
8.3.270.0110.00816.71
8.3.260.0080.01116.32
8.3.250.0080.00118.74
8.3.240.0050.00416.56
8.3.230.0150.00416.60
8.3.220.0030.00516.74
8.3.210.0080.00616.58
8.3.200.0400.01116.20
8.3.190.0430.01016.45
8.3.180.0300.00816.59
8.3.170.0440.00516.27
8.3.160.0390.00916.43
8.3.150.0360.01016.34
8.3.140.0360.01116.20
8.3.130.0300.01216.29
8.3.120.0310.01116.24
8.3.110.0430.00516.20
8.3.100.0380.01016.36
8.3.90.0380.00816.60
8.3.80.0290.01016.34
8.3.70.0400.00316.31
8.3.60.0370.00916.20
8.3.50.0410.00816.51
8.3.40.0170.00117.34
8.3.30.0330.00417.55
8.3.20.0290.00517.45
8.3.10.0280.00917.47
8.3.00.0280.00717.47
8.2.310.0120.01017.88
8.2.300.0170.00620.28
8.2.290.0060.00318.64
8.2.280.0290.00816.44
8.2.270.0310.00816.38
8.2.260.0290.01116.26
8.2.250.0330.00616.64
8.2.240.0310.00916.48
8.2.230.0350.00816.20
8.2.220.0300.01316.55
8.2.210.0340.00616.37
8.2.200.0290.01016.62
8.2.190.0330.01016.45
8.2.180.0360.00516.49
8.2.170.0380.01117.61
8.2.160.0370.00717.51
8.2.150.0340.00717.24
8.2.140.0360.00517.27
8.2.130.0320.01017.09
8.2.120.0380.00617.31
8.2.110.0380.00517.59
8.2.100.0460.00517.33
8.2.90.0360.01117.51
8.2.80.0370.00617.47
8.2.70.0290.01017.26
8.2.60.0350.00617.45
8.2.50.0280.01217.39
8.2.40.0230.00817.35
8.2.30.0300.00817.29
8.2.20.0290.00617.29
8.2.10.0310.00817.37
8.2.00.0280.00517.32
8.1.340.0140.00619.97

preferences:
48.98 ms | 883 KiB | 5 Q