3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $box; public function setBox(array $box) { // Segfault list($lat1, $lon1, $lat2, $lon2) = $this->box = $box; // Works perfectly fine $this->box = $box; list($lat1, $lon1, $lat2, $lon2) = $this->box; return $this; } } $foo = new Foo; $foo->setBox(explode(',', '40.688235,-74.013718,40.756427,-73.958770')); echo "Success";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1XaU2
function name:  (null)
number of ops:  12
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'setBox'
          4        INIT_FCALL                                               'explode'
          5        SEND_VAL                                                 '%2C'
          6        SEND_VAL                                                 '40.688235%2C-74.013718%2C40.756427%2C-73.958770'
          7        DO_ICALL                                         $4      
          8        SEND_VAR_NO_REF_EX                                       $4
          9        DO_FCALL                                      0          
   22    10        ECHO                                                     'Success'
         11      > RETURN                                                   1

Class Foo:
Function setbox:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1XaU2
function name:  setBox
number of ops:  27
compiled vars:  !0 = $box, !1 = $lat1, !2 = $lon1, !3 = $lat2, !4 = $lon2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ                                       ~5      'box'
          2        OP_DATA                                                  !0
          3        FETCH_LIST_R                                     $6      ~5, 0
          4        ASSIGN                                                   !1, $6
          5        FETCH_LIST_R                                     $8      ~5, 1
          6        ASSIGN                                                   !2, $8
          7        FETCH_LIST_R                                     $10     ~5, 2
          8        ASSIGN                                                   !3, $10
          9        FETCH_LIST_R                                     $12     ~5, 3
         10        ASSIGN                                                   !4, $12
         11        FREE                                                     ~5
   12    12        ASSIGN_OBJ                                               'box'
         13        OP_DATA                                                  !0
   13    14        FETCH_OBJ_R                                      ~15     'box'
         15        FETCH_LIST_R                                     $16     ~15, 0
         16        ASSIGN                                                   !1, $16
         17        FETCH_LIST_R                                     $18     ~15, 1
         18        ASSIGN                                                   !2, $18
         19        FETCH_LIST_R                                     $20     ~15, 2
         20        ASSIGN                                                   !3, $20
         21        FETCH_LIST_R                                     $22     ~15, 3
         22        ASSIGN                                                   !4, $22
         23        FREE                                                     ~15
   15    24        FETCH_THIS                                       ~24     
         25      > RETURN                                                   ~24
   16    26*     > RETURN                                                   null

End of function setbox

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.2 ms | 1400 KiB | 15 Q