Guest User

Untitled

a guest
Feb 17th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class foo {
  2. var $bar = array();
  3.  
  4. function baz($data) {
  5. $this->bar['data'] = $data; <---- works in php 5.6, not working in php 7.1
  6. }
  7. }
  8.  
  9. function __construct(){
  10. $this->bar = array();
  11. }
  12.  
  13. object(foo)#1 (1) {
  14. ["bar"]=>
  15. array(1) {
  16. ["data"]=>
  17. int(22)
  18. }
  19. }
  20.  
  21. function __construct(){
  22. $this->bar = array();
  23. }
Add Comment
Please, Sign In to add comment