3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = (($year = date('Y')) == 2012) ? $year : '2013-'. $year; echo $date;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9FpRb
function name:  (null)
number of ops:  13
compiled vars:  !0 = $date, !1 = $year
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'Y'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                           ~3      !1, $2
          4        IS_EQUAL                                                 ~3, 2012
          5      > JMPZ                                                     ~4, ->8
          6    >   QM_ASSIGN                                        ~5      !1
          7      > JMP                                                      ->10
          8    >   CONCAT                                           ~6      '2013-', !1
          9        QM_ASSIGN                                        ~5      ~6
         10    >   ASSIGN                                                   !0, ~5
    3    11        ECHO                                                     !0
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.94 ms | 1385 KiB | 15 Q