3v4l.org

run code in 300+ PHP versions simultaneously
<?php function diff($credit, $payment) { $credit = (int) $credit; $payment = (int) $payment; // unknown logic, could be a simple diff // like could be a payment process! echo $credit - $payment; } // good developer diff(2, 1); diff(2.5, 1.3); // good developer not strict diff('2', '1'); // good developer doing mistakes sum(2, -INF); sum(2, \stdClass);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ialf2
function name:  (null)
number of ops:  22
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'diff'
          1        SEND_VAL                                                 2
          2        SEND_VAL                                                 1
          3        DO_FCALL                                      0          
   14     4        INIT_FCALL                                               'diff'
          5        SEND_VAL                                                 2.5
          6        SEND_VAL                                                 1.3
          7        DO_FCALL                                      0          
   16     8        INIT_FCALL                                               'diff'
          9        SEND_VAL                                                 '2'
         10        SEND_VAL                                                 '1'
         11        DO_FCALL                                      0          
   18    12        INIT_FCALL_BY_NAME                                       'sum'
         13        SEND_VAL_EX                                              2
         14        SEND_VAL_EX                                              -INF
         15        DO_FCALL                                      0          
   19    16        INIT_FCALL_BY_NAME                                       'sum'
         17        SEND_VAL_EX                                              2
         18        FETCH_CONSTANT                                   ~4      'stdClass'
         19        SEND_VAL_EX                                              ~4
         20        DO_FCALL                                      0          
         21      > RETURN                                                   1

Function diff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ialf2
function name:  diff
number of ops:  9
compiled vars:  !0 = $credit, !1 = $payment
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        CAST                                          4  ~2      !0
          3        ASSIGN                                                   !0, ~2
    5     4        CAST                                          4  ~4      !1
          5        ASSIGN                                                   !1, ~4
    9     6        SUB                                              ~6      !0, !1
          7        ECHO                                                     ~6
   10     8      > RETURN                                                   null

End of function diff

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.33 ms | 1399 KiB | 16 Q