3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = '112312312312323'; $start_time = microtime(true); for ($i = 0; $i < 10000; $i++) { $foo = $foo.'1'; preg_match('/^[a-zA-Z0-9]+$/', $foo); // Result: 0.094325065612793 } $end_time = microtime(true); echo 'preg_match Result: ' . ($end_time - $start_time).PHP_EOL; $foo = '112312312312323'; $start_time = microtime(true); for ($i = 0; $i < 10000; $i++) { $foo = $foo.'1'; ctype_alnum($foo); // Result: 1.8465659618378 } $end_time = microtime(true); echo 'ctype Result: ' . ($end_time - $start_time).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.3.20.0120.07325.66
8.3.10.0030.04925.66
8.3.00.0070.04525.66
8.2.150.0130.06425.66
8.2.140.0000.09625.66
8.2.130.0100.06225.66
8.2.120.0030.06725.66
8.2.110.0070.15625.66
8.2.100.0130.17125.66
8.2.90.0250.16819.47
8.2.80.0190.16219.66
8.2.70.0280.16819.63
8.2.60.0210.16119.51
8.2.50.0200.16019.60
8.2.40.0190.15919.60
8.2.30.0200.16119.67
8.2.20.0200.16219.68
8.2.10.0200.16119.79
8.2.00.0140.16519.82
8.1.270.0070.08025.66
8.1.260.0030.06225.66
8.1.250.0000.08325.66
8.1.240.0160.17825.66
8.1.230.0230.18325.66
8.1.220.0140.16819.57
8.1.210.0210.16419.50
8.1.200.0170.17319.32
8.1.190.0140.17119.37
8.1.180.0160.17319.40
8.1.170.0140.17119.47
8.1.160.0160.16919.52
8.1.150.0170.17319.56
8.1.140.0160.17619.50
8.1.130.0160.17019.43
8.1.120.0170.16819.60
8.1.110.0230.18319.63
8.1.100.0190.17219.44
8.1.90.0150.17619.52
8.1.80.0190.17019.47
8.1.70.0210.17019.47
8.1.60.0190.16019.67
8.1.50.0190.16019.70
8.1.40.0190.16119.53
8.1.30.0190.17019.59
8.1.20.0180.16119.71
8.1.10.0280.15519.51
8.1.00.0200.16019.47
8.0.300.0210.06819.00
8.0.290.0210.07719.06
8.0.280.0220.07718.90
8.0.270.0180.08518.98
8.0.260.0250.06818.98
8.0.250.0210.06619.07
8.0.240.0190.07118.94
8.0.230.0190.08719.10
8.0.220.0210.07918.97
8.0.210.0200.07019.06
8.0.200.0210.06819.07
8.0.190.0260.07019.03
8.0.180.0200.06919.13
8.0.170.0230.06719.03
8.0.160.0160.07118.99
8.0.150.0220.06619.01
8.0.140.0220.08918.93
8.0.130.0180.07119.04
8.0.120.0190.07018.90
8.0.110.0140.07319.03
8.0.100.0260.07218.94
8.0.90.0260.07719.09
8.0.80.0220.08319.00
8.0.70.0250.07318.96
8.0.60.0170.07218.90
8.0.50.0210.07718.89
8.0.30.0160.07019.13
8.0.20.0150.07219.01
8.0.10.0230.07918.99
8.0.00.0210.06719.03
7.4.330.0160.06718.83
7.4.320.0200.07018.83
7.4.300.0230.07218.83
7.4.290.0170.06918.84
7.4.280.0120.07518.85
7.4.270.0200.06718.85
7.4.260.0200.08118.84
7.4.250.0250.07018.83
7.4.240.0250.07418.83
7.4.230.0220.07318.83
7.4.220.0190.06818.83
7.4.210.0220.07118.85
7.4.200.0180.07018.83
7.4.190.0200.07118.85
7.4.180.0180.06918.87
7.4.160.0160.07218.83
7.4.150.0250.07418.83
7.4.140.0190.07718.83
7.4.130.0160.07518.83
7.4.120.0180.07218.83
7.4.110.0180.07718.85
7.4.100.0200.07018.85
7.4.90.0170.07918.85
7.4.80.0210.07518.83
7.4.70.0220.07518.88
7.4.60.0190.07218.87
7.4.50.0220.07018.83
7.4.40.0200.08018.83
7.4.30.0190.07118.85
7.4.20.0260.07518.85
7.4.10.0200.08118.83
7.4.00.0210.07818.83
7.3.330.0180.07518.83
7.3.320.0210.08318.83
7.3.310.0180.07618.83
7.3.300.0200.07218.83
7.3.290.0180.08518.83
7.3.280.0180.08718.83
7.3.270.0220.08218.83
7.3.260.0210.08418.83
7.3.250.0240.09718.83
7.3.240.0190.07218.83
7.3.230.0200.07418.83
7.3.220.0270.07518.83
7.3.210.0180.07718.83
7.3.200.0170.07218.83
7.3.190.0200.06918.83
7.3.180.0220.07418.83
7.3.170.0190.07018.83
7.3.160.0240.08318.83
7.3.150.0210.07318.83
7.3.140.0200.08418.83
7.3.130.0190.07018.83
7.3.120.0240.07118.83
7.3.110.0230.07718.83
7.3.100.0190.07118.83
7.3.90.0230.07718.88
7.3.80.0170.08218.83
7.3.70.0240.08418.83
7.3.60.0160.08218.83
7.3.50.0180.08118.83
7.3.40.0210.06718.83
7.3.30.0190.07518.83
7.3.20.0330.07320.03
7.3.10.0200.08419.88
7.3.00.0210.07019.67
7.2.340.0170.07818.83
7.2.330.0150.07318.83
7.2.320.0230.07418.83
7.2.310.0240.07918.88
7.2.300.0160.07418.85
7.2.290.0200.07918.90
7.2.280.0170.07118.90
7.2.270.0210.06918.83
7.2.260.0180.08418.83
7.2.250.0230.07418.86
7.2.240.0160.09018.85
7.2.230.0230.07818.83
7.2.220.0210.07918.90
7.2.210.0150.08518.83
7.2.200.0200.08218.90
7.2.190.0190.07318.85
7.2.180.0190.07218.83
7.2.170.0230.07318.85
7.2.160.0140.08318.85
7.2.150.0220.07220.09
7.2.140.0160.07620.15
7.2.130.0190.08220.10
7.2.120.0200.08319.98
7.2.110.0280.07820.03
7.2.100.0150.08220.10
7.2.90.0270.07620.07
7.2.80.0370.08619.01
7.2.70.0420.09219.16
7.2.60.0420.09519.08
7.2.50.0400.09019.17
7.2.40.0490.09419.14
7.2.30.0520.10319.03
7.2.20.0500.09419.15
7.2.10.0310.10819.05
7.2.00.0570.09019.01
7.1.330.0170.07819.27
7.1.320.0180.08419.37
7.1.310.0210.07119.24
7.1.300.0220.09319.16
7.1.290.0170.08319.14
7.1.280.0180.08319.32
7.1.270.0190.08419.22
7.1.260.0230.06719.25
7.1.250.0230.08419.14
7.1.240.0200.07819.11
7.1.230.0120.07919.18
7.1.220.0180.07219.17
7.1.210.0170.07819.19
7.1.200.0130.07519.28
7.1.190.0460.10118.14
7.1.180.0440.09118.15
7.1.170.0450.09718.07
7.1.160.0540.09918.19
7.1.150.0550.10018.14
7.1.140.0460.10118.19
7.1.130.0470.10218.18
7.1.120.0490.09418.14
7.1.110.0500.09018.23
7.1.100.0430.10018.23
7.1.90.0190.09418.30
7.1.80.0210.10018.33
7.1.70.0170.10518.13
7.1.60.0200.10221.93
7.1.50.0190.11321.95
7.1.40.0580.09021.82
7.1.30.0450.08821.96
7.1.20.0220.08621.87
7.1.10.0170.09718.21
7.1.00.0710.09718.19
7.0.330.0140.08719.14
7.0.320.0180.08319.11
7.0.310.0170.08719.10
7.0.300.0190.08219.02
7.0.290.0190.09019.11
7.0.280.0200.08319.17
7.0.270.0170.09019.04
7.0.260.0190.07018.99
7.0.250.0200.08819.07
7.0.240.0190.07119.07
7.0.230.0200.07619.18
7.0.220.0140.07719.13
7.0.210.0190.07919.17
7.0.200.0200.07519.06
7.0.190.0180.09019.17
7.0.180.0170.08119.14
7.0.170.0180.07019.21
7.0.160.0220.08118.93
7.0.150.0170.07219.05
7.0.140.0220.07819.06
7.0.130.0150.08719.11
7.0.120.0210.07519.63
7.0.110.0170.07019.07
7.0.100.0150.07219.06
7.0.90.0140.07318.90
7.0.80.0140.07419.06
7.0.70.0190.07419.04
7.0.60.0210.06719.03
7.0.50.0160.07418.98
7.0.40.0130.07518.96
7.0.30.0170.06919.18
7.0.20.0150.07218.97
7.0.10.0160.07218.91
7.0.00.0190.06918.98
5.6.400.0210.08318.83
5.6.390.0190.07418.83
5.6.380.0140.08018.83
5.6.370.0180.07218.83
5.6.360.0140.07818.83
5.6.350.0170.07718.83
5.6.340.0170.08118.83
5.6.330.0170.08218.83
5.6.320.0190.07918.83
5.6.310.0190.08618.83
5.6.300.0160.08318.83
5.6.290.0180.07818.83
5.6.280.0150.07718.83
5.6.270.0140.08518.83
5.6.260.0160.07618.83
5.6.250.0150.07618.83
5.6.240.0160.07518.83
5.6.230.0160.07818.83
5.6.220.0180.07518.83
5.6.210.0160.07518.83
5.6.200.0190.07718.83
5.6.190.0140.07618.83
5.6.180.0200.08818.83
5.6.170.0150.07818.83
5.6.160.0140.09018.83
5.6.150.0200.08018.83
5.6.140.0170.07418.83
5.6.130.0190.07918.83
5.6.120.0180.09218.83
5.6.110.0130.09318.83
5.6.100.0160.09418.83
5.6.90.0160.09118.83
5.6.80.0200.07618.83
5.6.70.0160.09218.83
5.6.60.0140.08218.83
5.6.50.0220.08318.83
5.6.40.0190.08618.83
5.6.30.0120.08818.83
5.6.20.0180.08218.83
5.6.10.0140.08318.83
5.6.00.0200.09218.83

preferences:
31.6 ms | 408 KiB | 5 Q