3v4l.org

run code in 300+ PHP versions simultaneously
<?php $post_max_size = 8 * 1024 * 1024; function generateFile($filename, $width, $lines, $type = 'binary-text') { $text = ''; $t0 = microtime(TRUE); for ($i = 0; $i < $lines; $i++) { // Generate $width - 1 characters to leave space for the "\n" character. for ($j = 0; $j < $width - 1; $j++) { switch ($type) { case 'text': $text .= chr(rand(32, 126)); break; case 'binary': $text .= chr(rand(0, 31)); break; case 'binary-text': default: $text .= rand(0, 1); break; } } $text .= "\n"; $t1 = microtime(TRUE); print "Iteration $i - " . (($t1 - $t0) * 1000) . ' ms' . "\n"; $t0 = $t1; } // Create filename. $filename = '/tmp/' . $filename . '.txt'; //file_put_contents($filename, $text); return $filename; } echo generateFile('exceeding_post_max_size', ceil(($post_max_size + 1024) / 1024), 1024);

Abusive script

This script was stopped while abusing our resources

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.40.0670.67935.11
8.3.30.0330.65434.61
8.3.20.0370.69037.18
8.3.10.0370.66337.32
8.3.00.0310.45334.60
8.2.170.0400.63834.53
8.2.160.0570.63535.51
8.2.150.0370.71734.65
8.2.140.0430.68535.94
8.2.130.0270.42835.23
8.2.120.0400.47934.75
8.2.110.0320.49934.85
8.2.100.0400.47934.77
8.2.90.0200.51834.53
8.2.80.0350.51634.74
8.2.70.0320.51934.35
8.2.60.0340.56834.39
8.2.50.0250.58434.51
8.2.40.0310.58834.50
8.2.30.0220.59134.46
8.2.20.0330.59234.54
8.2.10.0220.58934.47
8.2.00.0230.54434.50
8.1.270.0600.59037.49
8.1.260.0270.49537.71
8.1.250.0270.45337.88
8.1.240.0380.44534.38
8.1.230.0100.34734.47
8.1.220.0200.34334.47
8.1.210.0270.30434.41
8.1.200.0380.46734.11
8.1.190.0250.44634.22
8.1.180.0170.46334.26
8.1.170.0210.43034.23
8.1.160.0160.45634.27
8.1.150.0230.43134.31
8.1.140.0300.55334.49
8.1.130.0260.55234.00
8.1.120.0260.54634.35
8.1.110.0230.55034.38
8.1.100.0200.53934.25
8.1.90.0260.50935.25
8.1.80.0300.55334.29
8.1.70.0170.56733.89
8.1.60.0230.58634.27
8.1.50.0260.56933.86
8.1.40.0200.57134.54
8.1.30.0330.57634.46
8.1.20.0290.58534.01

preferences:
32.24 ms | 403 KiB | 5 Q