3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = ['test' => 'bar']; if (!($json = @json_encode($data))) { print "true"; } else { print "false"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IarUZ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $data, !1 = $json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ASSIGN                                                   !0, <array>
    3     1        BEGIN_SILENCE                                    ~3      
          2        INIT_FCALL                                               'json_encode'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        END_SILENCE                                              ~3
          6        ASSIGN                                           ~5      !1, $4
          7        BOOL_NOT                                         ~6      ~5
          8      > JMPZ                                                     ~6, ->11
    4     9    >   ECHO                                                     'true'
         10      > JMP                                                      ->12
    5    11    >   ECHO                                                     'false'
         12    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.56 ms | 1394 KiB | 15 Q