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 diff(2, array('foo' => 'bar')); diff(2, new GenericClassInjected);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7DWr0
function name:  (null)
number of ops:  23
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          
   17     8        INIT_FCALL                                               'diff'
          9        SEND_VAL                                                 '2'
         10        SEND_VAL                                                 '1'
         11        DO_FCALL                                      0          
   20    12        INIT_FCALL                                               'diff'
         13        SEND_VAL                                                 2
         14        SEND_VAL                                                 <array>
         15        DO_FCALL                                      0          
   21    16        INIT_FCALL                                               'diff'
         17        SEND_VAL                                                 2
         18        NEW                                              $4      'GenericClassInjected'
         19        DO_FCALL                                      0          
         20        SEND_VAR                                                 $4
         21        DO_FCALL                                      0          
         22      > RETURN                                                   1

Function diff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7DWr0
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:
192.72 ms | 1390 KiB | 18 Q