3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Say we have a 74-page file $num_pages = 74; // Fill and array. $pages = range(1, $num_pages); $sections = array(); for ($i = 1; $i <= $pages; $i = $i+2) { $next = $i+1; $sections[] = "pdftk A=the.pdf cat A{$i}-{$next} output the_pages_{$i}-{$next}.pdf"; } print_r($sections);

Abusive script

This script was stopped while abusing our resources

Output for 7.0.31 - 7.2.9

Process exited with code 137.