3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo($bar) { $parts = explode('-', $bar); $x = (int) $parts[0]; $y = (int) $parts[1]; $min = min($x, $y); $max = max($x, $y); var_dump($min); var_dump($max); } foo('30 - 40');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Dt0f
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                                   'foo'
          1        SEND_VAL                                                     '30+-+40'
          2        DO_FCALL                                          0          
          3      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Dt0f
function name:  foo
number of ops:  23
compiled vars:  !0 = $bar, !1 = $parts, !2 = $x, !3 = $y, !4 = $min, !5 = $max
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    5     1        INIT_FCALL                                                   'explode'
          2        SEND_VAL                                                     '-'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $6      
          5        ASSIGN                                                       !1, $6
    6     6        FETCH_DIM_R                                          ~8      !1, 0
          7        CAST                                              4  ~9      ~8
          8        ASSIGN                                                       !2, ~9
    7     9        FETCH_DIM_R                                          ~11     !1, 1
         10        CAST                                              4  ~12     ~11
         11        ASSIGN                                                       !3, ~12
    8    12        FRAMELESS_ICALL_2                min                 ~14     !2, !3
         13        ASSIGN                                                       !4, ~14
    9    14        FRAMELESS_ICALL_2                max                 ~16     !2, !3
         15        ASSIGN                                                       !5, ~16
   10    16        INIT_FCALL                                                   'var_dump'
         17        SEND_VAR                                                     !4
         18        DO_ICALL                                                     
   11    19        INIT_FCALL                                                   'var_dump'
         20        SEND_VAR                                                     !5
         21        DO_ICALL                                                     
   12    22      > RETURN                                                       null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.84 ms | 2854 KiB | 16 Q