3v4l.org

run code in 300+ PHP versions simultaneously
<?php $p1 = [2]; $p2 =[4]; echo distance($p1, $p2); function distance($x, $y) { $d = hypot($x, $y); echo $d; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5SH3h
function name:  (null)
number of ops:  8
compiled vars:  !0 = $p1, !1 = $p2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL_BY_NAME                                       'distance'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
   11     7      > RETURN                                                   1

Function distance:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5SH3h
function name:  distance
number of ops:  9
compiled vars:  !0 = $x, !1 = $y, !2 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        INIT_FCALL                                               'hypot'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !2, $3
   10     7        ECHO                                                     !2
   11     8      > RETURN                                                   null

End of function distance

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.03 ms | 1395 KiB | 15 Q