3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f = function ($value) { return ((string) (int) $value) === (string) $value; }; var_dump($f('1')); var_dump($f(1)); var_dump($f(0)); var_dump($f('0')); var_dump($f('')); var_dump($f(true)); var_dump($f(false));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/doato
function name:  (null)
number of ops:  45
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fdoato%3A3%240'
          1        ASSIGN                                                   !0, ~1
    7     2        INIT_FCALL                                               'var_dump'
          3        INIT_DYNAMIC_CALL                                        !0
          4        SEND_VAL_EX                                              '1'
          5        DO_FCALL                                      0  $3      
          6        SEND_VAR                                                 $3
          7        DO_ICALL                                                 
    8     8        INIT_FCALL                                               'var_dump'
          9        INIT_DYNAMIC_CALL                                        !0
         10        SEND_VAL_EX                                              1
         11        DO_FCALL                                      0  $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
    9    14        INIT_FCALL                                               'var_dump'
         15        INIT_DYNAMIC_CALL                                        !0
         16        SEND_VAL_EX                                              0
         17        DO_FCALL                                      0  $7      
         18        SEND_VAR                                                 $7
         19        DO_ICALL                                                 
   10    20        INIT_FCALL                                               'var_dump'
         21        INIT_DYNAMIC_CALL                                        !0
         22        SEND_VAL_EX                                              '0'
         23        DO_FCALL                                      0  $9      
         24        SEND_VAR                                                 $9
         25        DO_ICALL                                                 
   11    26        INIT_FCALL                                               'var_dump'
         27        INIT_DYNAMIC_CALL                                        !0
         28        SEND_VAL_EX                                              ''
         29        DO_FCALL                                      0  $11     
         30        SEND_VAR                                                 $11
         31        DO_ICALL                                                 
   12    32        INIT_FCALL                                               'var_dump'
         33        INIT_DYNAMIC_CALL                                        !0
         34        SEND_VAL_EX                                              <true>
         35        DO_FCALL                                      0  $13     
         36        SEND_VAR                                                 $13
         37        DO_ICALL                                                 
   13    38        INIT_FCALL                                               'var_dump'
         39        INIT_DYNAMIC_CALL                                        !0
         40        SEND_VAL_EX                                              <false>
         41        DO_FCALL                                      0  $15     
         42        SEND_VAR                                                 $15
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fdoato%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/doato
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        CAST                                          4  ~1      !0
          2        CAST                                          6  ~2      ~1
          3        CAST                                          6  ~3      !0
          4        IS_IDENTICAL                                     ~4      ~2, ~3
          5      > RETURN                                                   ~4
    5     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fdoato%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.44 ms | 1392 KiB | 15 Q