3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [-59.33, -58.22, -57.00, -55.34, -50.00, -45.94, -40.23, -5.12, 0, 1, 3, 5, 7, 19, 20,25,26, 32, 38, 40, 45, 50, 55]; $b = -25; $c = array_map(function($value) use($b){ return abs(bcsub($value, $b, 2)); }, $a); sort($c); echo $c[0]+$b; echo $c[0] - $b; echo "\n"; echo $c[1]+$b;
based on AhNdR
Output for 7.3.0alpha1
Fatal error: Uncaught Error: Call to undefined function bcsub() in /in/6A9mG:8 Stack trace: #0 [internal function]: {closure}(-59.33) #1 /in/6A9mG(9): array_map(Object(Closure), Array) #2 {main} thrown in /in/6A9mG on line 8
Process exited with code 255.
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6
-9.7740.23 -5.12