3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inputs = array(NULL, 0, 1, 1.1, '1.1'); foreach ($inputs as $input) { $output = key(array($input => NULL)); printf("Input: %s\n", var_export($input, TRUE)); printf("Output: %s\n\n", var_export($output, TRUE)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 25
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 25
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/taXU1
function name:  (null)
number of ops:  27
compiled vars:  !0 = $inputs, !1 = $input, !2 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1      > FE_RESET_R                                       $4      !0, ->25
          2    > > FE_FETCH_R                                               $4, !1, ->25
    4     3    >   INIT_FCALL                                               'key'
          4        INIT_ARRAY                                       ~5      null, !1
          5        SEND_VAL                                                 ~5
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    5     8        INIT_FCALL                                               'printf'
          9        SEND_VAL                                                 'Input%3A++%25s%0A'
         10        INIT_FCALL                                               'var_export'
         11        SEND_VAR                                                 !1
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $8      
         14        SEND_VAR                                                 $8
         15        DO_ICALL                                                 
    6    16        INIT_FCALL                                               'printf'
         17        SEND_VAL                                                 'Output%3A+%25s%0A%0A'
         18        INIT_FCALL                                               'var_export'
         19        SEND_VAR                                                 !2
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $10     
         22        SEND_VAR                                                 $10
         23        DO_ICALL                                                 
    3    24      > JMP                                                      ->2
         25    >   FE_FREE                                                  $4
    7    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.19 ms | 1395 KiB | 19 Q