3v4l.org

run code in 500+ PHP versions simultaneously
<?php $value = 0.7; echo min(1, max($value, 0)) ; print PHP_EOL; echo max(0, min($value, 1)) ;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FM5ZC
function name:  (null)
number of ops:  9
compiled vars:  !0 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 0.7
    5     1        FRAMELESS_ICALL_2                max                 ~2      !0, 0
          2        FRAMELESS_ICALL_2                min                 ~3      1, ~2
          3        ECHO                                                         ~3
    6     4        ECHO                                                         '%0A'
    7     5        FRAMELESS_ICALL_2                min                 ~4      !0, 1
          6        FRAMELESS_ICALL_2                max                 ~5      0, ~4
          7        ECHO                                                         ~5
          8      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.92 ms | 1098 KiB | 13 Q