3v4l.org

run code in 300+ PHP versions simultaneously
<?php function surprise($str = '') { if ($str !== '') { static $value = 'value est plein'; echo $value; return; } static $value = ''; echo 'value est vide'; return; } surprise('test');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Phu44
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'surprise'
          1        SEND_VAL                                                 'test'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function surprise:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Phu44
function name:  surprise
number of ops:  10
compiled vars:  !0 = $str, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      ''
    5     1        IS_NOT_IDENTICAL                                         !0, ''
          2      > JMPZ                                                     ~2, ->6
    7     3    >   BIND_STATIC                                              !1
    8     4        ECHO                                                     !1
    9     5      > RETURN                                                   null
   12     6    >   BIND_STATIC                                              !1
   13     7        ECHO                                                     'value+est+vide'
   14     8      > RETURN                                                   null
   15     9*     > RETURN                                                   null

End of function surprise

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.47 ms | 1397 KiB | 14 Q