3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $val = "209810563658809344"; echo sprintf('%0.0f', ($val - 1)) . '<br />'; echo bcsub($val, 1) . '<br />'; $val = "355325317306527744"; echo sprintf('%0.0f', ($val - 1)) . '<br />'; echo bcsub($val, 1) . '<br />'; echo php_uname();
Output for 7.1.0
209810563658809344<br />209810563658809343<br />355325317306527744<br />355325317306527743<br />Linux php_shell 4.8.11-1-ARCH #1 SMP PREEMPT Sun Nov 27 09:26:14 CET 2016 x86_64
Output for 5.6.28, 7.0.14
209810563658809344<br />209810563658809343<br />355325317306527744<br />355325317306527743<br />Linux php_shell 4.8.6-1-ARCH #1 SMP PREEMPT Mon Oct 31 18:51:30 CET 2016 x86_64
Output for 5.5.24 - 5.5.28, 5.5.31 - 5.5.32, 5.6.8 - 5.6.12, 5.6.16 - 5.6.18, 5.6.21, hhvm-3.10.0, 7.0.0 - 7.0.3, 7.0.6
209810563658809344<br />209810563658809343<br />355325317306527744<br />355325317306527743<br />Linux php_shell 4.4.5-1-ARCH #1 SMP PREEMPT Thu Mar 10 07:38:19 CET 2016 x86_64
Output for 7.0.5
209810563658809344<br /> Fatal error: Uncaught Error: Call to undefined function bcsub() in /in/sTk5J:4 Stack trace: #0 {main} thrown in /in/sTk5J on line 4
Process exited with code 255.
Output for 5.5.33, 5.6.19, hhvm-3.12.0, 7.0.4
209810563658809344<br />209810563658809343<br />355325317306527744<br />355325317306527743<br />Linux php_shell 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016 x86_64
Output for 5.5.29 - 5.5.30, 5.5.34, 5.6.13 - 5.6.15, 5.6.20
209810563658809344<br /> Fatal error: Call to undefined function bcsub() in /in/sTk5J on line 4
Process exited with code 255.
Output for 5.5.35 - 5.6.7
209810563658809344<br />209810563658809343<br />355325317306527744<br />355325317306527743<br />Linux php_shell 4.5.4-1-ARCH #1 SMP PREEMPT Wed May 11 22:21:28 CEST 2016 x86_64
Output for 5.2.1 - 5.4.45
209810563658809344<br />209810563658809343<br />355325317306527744<br />355325317306527743<br />Linux php_shell 4.2.3-1-ARCH #1 SMP PREEMPT Sat Oct 3 18:52:50 CEST 2015 x86_64
Output for 4.3.0 - 5.2.0
209810563658809350<br />209810563658809343<br />355325317306527750<br />355325317306527743<br />Linux php_shell 4.2.3-1-ARCH #1 SMP PREEMPT Sat Oct 3 18:52:50 CEST 2015 x86_64