3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [20,22,29,40,67,35,98,200,205,220]; subTractReccursive($a); function subTractReccursive($a){ for($i=0;$i<count($a)-1;$i++){ $c[] = $a[$i+1]-$a[$i]; } echo implode (' ',$c)."\n"; if(count($c) > 1){ subTractReccursive($c); } return; }
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.14, 8.5.0
2 7 11 27 -32 63 102 5 15 5 4 16 -59 95 39 -97 10 -1 12 -75 154 -56 -136 107 13 -87 229 -210 -80 243 -100 316 -439 130 323 416 -755 569 193 -1171 1324 -376 2495 -1700 -4195
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 8.3.28
/bin/php-8.3.28: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.3.28) /bin/php-8.3.28: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.3.28) /bin/php-8.3.28: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.3.28) /bin/php-8.3.28: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.3.28)
Process exited with code 1.

preferences:
107.59 ms | 407 KiB | 5 Q