3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var1 = 123; $var2 = '456A'; $var3 = 789; echo to_number($var1); echo to_number($var2); echo to_number($var3); # convert var to number function to_number($var) { return 0 + $var; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LCJV1
function name:  (null)
number of ops:  16
compiled vars:  !0 = $var1, !1 = $var2, !2 = $var3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 123
    5     1        ASSIGN                                                   !1, '456A'
    6     2        ASSIGN                                                   !2, 789
    8     3        INIT_FCALL_BY_NAME                                       'to_number'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $6      
          6        ECHO                                                     $6
    9     7        INIT_FCALL_BY_NAME                                       'to_number'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0  $7      
         10        ECHO                                                     $7
   10    11        INIT_FCALL_BY_NAME                                       'to_number'
         12        SEND_VAR_EX                                              !2
         13        DO_FCALL                                      0  $8      
         14        ECHO                                                     $8
   16    15      > RETURN                                                   1

Function to_number:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LCJV1
function name:  to_number
number of ops:  4
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        ADD                                              ~1      0, !0
          2      > RETURN                                                   ~1
   16     3*     > RETURN                                                   null

End of function to_number

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.34 ms | 1393 KiB | 13 Q