3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump( strcmp("5", 5), // => 0 strcmp("15", 0xf), // => 0 strcmp(61529519452809720693702583126814, 61529519452809720000000000000000), // => 0 strcmp(NULL, false), // => 0 strcmp(NULL, ""), // => 0 strcmp(NULL, 0), // => -1 strcmp(false, -1), // => -2 strcmp("15", NULL), // => 2 strcmp(NULL, "foo"), // => -3 strcmp("foo", NULL), // => 3 strcmp("foo", false), // => 3 strcmp("foo", 0), // => 1 strcmp("foo", 5), // => 1 strcmp("foo", array()), // => NULL + PHP Warning strcmp("foo", new stdClass), // => NULL + PHP Warning strcmp(function(){}, "") // => NULL + PHP Warning );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X3SnD
function name:  (null)
number of ops:  86
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
    3     1        INIT_FCALL                                               'strcmp'
          2        SEND_VAL                                                 '5'
          3        SEND_VAL                                                 5
          4        DO_ICALL                                         $0      
          5        SEND_VAR                                                 $0
    4     6        INIT_FCALL                                               'strcmp'
          7        SEND_VAL                                                 '15'
          8        SEND_VAL                                                 15
          9        DO_ICALL                                         $1      
         10        SEND_VAR                                                 $1
    5    11        INIT_FCALL                                               'strcmp'
         12        SEND_VAL                                                 6.15295e+31
         13        SEND_VAL                                                 6.15295e+31
         14        DO_ICALL                                         $2      
         15        SEND_VAR                                                 $2
    6    16        INIT_FCALL                                               'strcmp'
         17        SEND_VAL                                                 null
         18        SEND_VAL                                                 <false>
         19        DO_ICALL                                         $3      
         20        SEND_VAR                                                 $3
    7    21        INIT_FCALL                                               'strcmp'
         22        SEND_VAL                                                 null
         23        SEND_VAL                                                 ''
         24        DO_ICALL                                         $4      
         25        SEND_VAR                                                 $4
    8    26        INIT_FCALL                                               'strcmp'
         27        SEND_VAL                                                 null
         28        SEND_VAL                                                 0
         29        DO_ICALL                                         $5      
         30        SEND_VAR                                                 $5
    9    31        INIT_FCALL                                               'strcmp'
         32        SEND_VAL                                                 <false>
         33        SEND_VAL                                                 -1
         34        DO_ICALL                                         $6      
         35        SEND_VAR                                                 $6
   10    36        INIT_FCALL                                               'strcmp'
         37        SEND_VAL                                                 '15'
         38        SEND_VAL                                                 null
         39        DO_ICALL                                         $7      
         40        SEND_VAR                                                 $7
   11    41        INIT_FCALL                                               'strcmp'
         42        SEND_VAL                                                 null
         43        SEND_VAL                                                 'foo'
         44        DO_ICALL                                         $8      
         45        SEND_VAR                                                 $8
   12    46        INIT_FCALL                                               'strcmp'
         47        SEND_VAL                                                 'foo'
         48        SEND_VAL                                                 null
         49        DO_ICALL                                         $9      
         50        SEND_VAR                                                 $9
   13    51        INIT_FCALL                                               'strcmp'
         52        SEND_VAL                                                 'foo'
         53        SEND_VAL                                                 <false>
         54        DO_ICALL                                         $10     
         55        SEND_VAR                                                 $10
   14    56        INIT_FCALL                                               'strcmp'
         57        SEND_VAL                                                 'foo'
         58        SEND_VAL                                                 0
         59        DO_ICALL                                         $11     
         60        SEND_VAR                                                 $11
   15    61        INIT_FCALL                                               'strcmp'
         62        SEND_VAL                                                 'foo'
         63        SEND_VAL                                                 5
         64        DO_ICALL                                         $12     
         65        SEND_VAR                                                 $12
   16    66        INIT_FCALL                                               'strcmp'
         67        SEND_VAL                                                 'foo'
         68        SEND_VAL                                                 <array>
         69        DO_ICALL                                         $13     
         70        SEND_VAR                                                 $13
   17    71        INIT_FCALL                                               'strcmp'
         72        SEND_VAL                                                 'foo'
         73        NEW                                              $14     'stdClass'
         74        DO_FCALL                                      0          
         75        SEND_VAR                                                 $14
         76        DO_ICALL                                         $16     
         77        SEND_VAR                                                 $16
   18    78        INIT_FCALL                                               'strcmp'
         79        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FX3SnD%3A18%240'
         80        SEND_VAL                                                 ~17
         81        SEND_VAL                                                 ''
         82        DO_ICALL                                         $18     
         83        SEND_VAR                                                 $18
         84        DO_ICALL                                                 
   19    85      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FX3SnD%3A18%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X3SnD
function name:  {closure}
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FX3SnD%3A18%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.14 ms | 1400 KiB | 17 Q