3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getPartnerData($data) { $partner = $data['is_partner']; if ($partner !== '1') { $is_partner = false; } elseif ($partner == '1') { $is_partner = true; } return $is_partner; } var_dump( getPartnerData(['is_partner' => '1']), getPartnerData(['is_partner' => '2']) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b8vTq
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'var_dump'
   15     1        INIT_FCALL                                               'getpartnerdata'
          2        SEND_VAL                                                 <array>
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
   16     5        INIT_FCALL                                               'getpartnerdata'
          6        SEND_VAL                                                 <array>
          7        DO_FCALL                                      0  $1      
          8        SEND_VAR                                                 $1
          9        DO_ICALL                                                 
   17    10      > RETURN                                                   1

Function getpartnerdata:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/b8vTq
function name:  getPartnerData
number of ops:  12
compiled vars:  !0 = $data, !1 = $partner, !2 = $is_partner
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        FETCH_DIM_R                                      ~3      !0, 'is_partner'
          2        ASSIGN                                                   !1, ~3
    6     3        IS_NOT_IDENTICAL                                         !1, '1'
          4      > JMPZ                                                     ~5, ->7
    7     5    >   ASSIGN                                                   !2, <false>
          6      > JMP                                                      ->10
    8     7    >   IS_EQUAL                                                 !1, '1'
          8      > JMPZ                                                     ~7, ->10
    9     9    >   ASSIGN                                                   !2, <true>
   11    10    > > RETURN                                                   !2
   12    11*     > RETURN                                                   null

End of function getpartnerdata

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.45 ms | 939 KiB | 18 Q