3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyEmpty { public function check(&$var) { return empty($var); } public function checkNon($var) { return empty($var); } } $empty = new MyEmpty; var_dump($empty->check($foo['bar'])); var_dump($empty->checkNon($foo['bar']));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IlN7n
function name:  (null)
number of ops:  20
compiled vars:  !0 = $empty, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'MyEmpty'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   15     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'check'
          5        CHECK_FUNC_ARG                                           
          6        FETCH_DIM_FUNC_ARG                               $5      !1, 'bar'
          7        SEND_FUNC_ARG                                            $5
          8        DO_FCALL                                      0  $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                                 
   16    11        INIT_FCALL                                               'var_dump'
         12        INIT_METHOD_CALL                                         !0, 'checkNon'
         13        CHECK_FUNC_ARG                                           
         14        FETCH_DIM_FUNC_ARG                               $8      !1, 'bar'
         15        SEND_FUNC_ARG                                            $8
         16        DO_FCALL                                      0  $9      
         17        SEND_VAR                                                 $9
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Class MyEmpty:
Function check:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IlN7n
function name:  check
number of ops:  4
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ISSET_ISEMPTY_CV                                 ~1      !0
          2      > RETURN                                                   ~1
    6     3*     > RETURN                                                   null

End of function check

Function checknon:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IlN7n
function name:  checkNon
number of ops:  4
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        ISSET_ISEMPTY_CV                                 ~1      !0
          2      > RETURN                                                   ~1
   10     3*     > RETURN                                                   null

End of function checknon

End of class MyEmpty.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.17 ms | 1396 KiB | 15 Q