3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data['frequency'] = 0; $data['amount'] = 50; $data['custom-amount'] = 3.00; $charge = (function() use ($data) { if( $data['frequency']< 1 ) { if($data['amount'] == "0") { return $data['custom-amount']; }else { return $data['amount']; } }else { return "0.00"; } })(); echo $charge;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3vJRa
function name:  (null)
number of ops:  13
compiled vars:  !0 = $data, !1 = $charge
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 'frequency'
          1        OP_DATA                                                  0
    4     2        ASSIGN_DIM                                               !0, 'amount'
          3        OP_DATA                                                  50
    5     4        ASSIGN_DIM                                               !0, 'custom-amount'
          5        OP_DATA                                                  3
    8     6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F3vJRa%3A8%240'
          7        BIND_LEXICAL                                             ~5, !0
   18     8        INIT_DYNAMIC_CALL                                        ~5
          9        DO_FCALL                                      0  $6      
    8    10        ASSIGN                                                   !1, $6
   20    11        ECHO                                                     !1
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F3vJRa%3A8%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3vJRa
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   BIND_STATIC                                              !0
    9     1        FETCH_DIM_R                                      ~1      !0, 'frequency'
          2        IS_SMALLER                                               ~1, 1
          3      > JMPZ                                                     ~2, ->13
   10     4    >   FETCH_DIM_R                                      ~3      !0, 'amount'
          5        IS_EQUAL                                                 ~3, '0'
          6      > JMPZ                                                     ~4, ->10
   11     7    >   FETCH_DIM_R                                      ~5      !0, 'custom-amount'
          8      > RETURN                                                   ~5
          9*       JMP                                                      ->12
   13    10    >   FETCH_DIM_R                                      ~6      !0, 'amount'
         11      > RETURN                                                   ~6
         12*       JMP                                                      ->14
   16    13    > > RETURN                                                   '0.00'
   18    14*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F3vJRa%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.22 ms | 1386 KiB | 13 Q