3v4l.org

run code in 300+ PHP versions simultaneously
<?php function assertFalse( $expected, $message ) { if ( false !== $value ) { echo $message; return false; } else { return true; } } function assertTrue( $expected, $message ) { if ( true !== $value ) { echo $message; return false; } else { return true; } } $streamable = 0; $streamableS = '0'; var_dump( (bool) $streamable ); var_dump( (bool) $streamableS ); $camel = '@attr'; var_dump( strtolower( preg_replace( '#([a-zA-Z])(?=[A-Z])#', '$1_', trim( preg_replace('/[^A-Za-z0-9_-]+/', '_', $camel ), '_' ) ) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kWFH4
function name:  (null)
number of ops:  32
compiled vars:  !0 = $streamable, !1 = $streamableS, !2 = $camel
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   ASSIGN                                                   !0, 0
   29     1        ASSIGN                                                   !1, '0'
   31     2        INIT_FCALL                                               'var_dump'
          3        BOOL                                             ~5      !0
          4        SEND_VAL                                                 ~5
          5        DO_ICALL                                                 
   32     6        INIT_FCALL                                               'var_dump'
          7        BOOL                                             ~7      !1
          8        SEND_VAL                                                 ~7
          9        DO_ICALL                                                 
   34    10        ASSIGN                                                   !2, '%40attr'
   36    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'strtolower'
         13        INIT_FCALL                                               'preg_replace'
         14        SEND_VAL                                                 '%23%28%5Ba-zA-Z%5D%29%28%3F%3D%5BA-Z%5D%29%23'
         15        SEND_VAL                                                 '%241_'
         16        INIT_FCALL                                               'trim'
         17        INIT_FCALL                                               'preg_replace'
         18        SEND_VAL                                                 '%2F%5B%5EA-Za-z0-9_-%5D%2B%2F'
         19        SEND_VAL                                                 '_'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                         $10     
         22        SEND_VAR                                                 $10
         23        SEND_VAL                                                 '_'
         24        DO_ICALL                                         $11     
         25        SEND_VAR                                                 $11
         26        DO_ICALL                                         $12     
         27        SEND_VAR                                                 $12
         28        DO_ICALL                                         $13     
         29        SEND_VAR                                                 $13
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Function assertfalse:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kWFH4
function name:  assertFalse
number of ops:  9
compiled vars:  !0 = $expected, !1 = $message, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        TYPE_CHECK                                  1018          !2
          3      > JMPZ                                                     ~3, ->7
    6     4    >   ECHO                                                     !1
    7     5      > RETURN                                                   <false>
          6*       JMP                                                      ->8
   11     7    > > RETURN                                                   <true>
   13     8*     > RETURN                                                   null

End of function assertfalse

Function asserttrue:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kWFH4
function name:  assertTrue
number of ops:  9
compiled vars:  !0 = $expected, !1 = $message, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   17     2        TYPE_CHECK                                  1014          !2
          3      > JMPZ                                                     ~3, ->7
   19     4    >   ECHO                                                     !1
   20     5      > RETURN                                                   <false>
          6*       JMP                                                      ->8
   24     7    > > RETURN                                                   <true>
   26     8*     > RETURN                                                   null

End of function asserttrue

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.47 ms | 1400 KiB | 21 Q