val before access = NULL
Warning: Trying to access array offset on null in /in/F8EOY on line 7
accessing NULL as array
set NULL offset 'test' to string 'wtf'
NULL offset 'test' = wtf
val after access = array (
'test' => 'wtf',
)
val before access = 'test'
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /in/F8EOY:7
Stack trace:
#0 /in/F8EOY(18): test_val_as_array('test')
#1 {main}
thrown in /in/F8EOY on line 7
Process exited with code 255.
val before access = NULL
Warning: Trying to access array offset on value of type null in /in/F8EOY on line 7
accessing NULL as array
set NULL offset 'test' to string 'wtf'
NULL offset 'test' = wtf
val after access = array (
'test' => 'wtf',
)
val before access = 'test'
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /in/F8EOY:7
Stack trace:
#0 /in/F8EOY(18): test_val_as_array('test')
#1 {main}
thrown in /in/F8EOY on line 7
Process exited with code 255.
Output for 7.4.0 - 7.4.33
val before access = NULL
Notice: Trying to access array offset on value of type null in /in/F8EOY on line 7
accessing NULL as array
set NULL offset 'test' to string 'wtf'
NULL offset 'test' = wtf
val after access = array (
'test' => 'wtf',
)
val before access = 'test'
Warning: Illegal string offset 'test' in /in/F8EOY on line 7
accessing string as array t
Warning: Illegal string offset 'test' in /in/F8EOY on line 8
set string offset 'test' to string 'wtf'
Warning: Illegal string offset 'test' in /in/F8EOY on line 10
string offset 'test' = w
val after access = 'west'
val before access = 123
Notice: Trying to access array offset on value of type int in /in/F8EOY on line 7
accessing integer as array
Warning: Cannot use a scalar value as an array in /in/F8EOY on line 8
set integer offset 'test' to string 'wtf'
Notice: Trying to access array offset on value of type int in /in/F8EOY on line 10
integer offset 'test' =
val after access = 123
val before access = true
Notice: Trying to access array offset on value of type bool in /in/F8EOY on line 7
accessing boolean as array
Warning: Cannot use a scalar value as an array in /in/F8EOY on line 8
set boolean offset 'test' to string 'wtf'
Notice: Trying to access array offset on value of type bool in /in/F8EOY on line 10
boolean offset 'test' =
val after access = true
val before access = 1.2
Notice: Trying to access array offset on value of type float in /in/F8EOY on line 7
accessing double as array
Warning: Cannot use a scalar value as an array in /in/F8EOY on line 8
set double offset 'test' to string 'wtf'
Notice: Trying to access array offset on value of type float in /in/F8EOY on line 10
double offset 'test' =
val after access = 1.2
val before access = NULL
accessing NULL as array
set NULL offset 'test' to string 'wtf'
NULL offset 'test' = wtf
val after access = array (
'test' => 'wtf',
)
val before access = 'test'
Warning: Illegal string offset 'test' in /in/F8EOY on line 7
accessing string as array t
Warning: Illegal string offset 'test' in /in/F8EOY on line 8
set string offset 'test' to string 'wtf'
Warning: Illegal string offset 'test' in /in/F8EOY on line 10
string offset 'test' = w
val after access = 'west'
val before access = 123
accessing integer as array
Warning: Cannot use a scalar value as an array in /in/F8EOY on line 8
set integer offset 'test' to string 'wtf'
integer offset 'test' =
val after access = 123
val before access = true
accessing boolean as array
Warning: Cannot use a scalar value as an array in /in/F8EOY on line 8
set boolean offset 'test' to string 'wtf'
boolean offset 'test' =
val after access = true
val before access = 1.2
accessing double as array
Warning: Cannot use a scalar value as an array in /in/F8EOY on line 8
set double offset 'test' to string 'wtf'
double offset 'test' =
val after access = 1.2
val before access = NULL
accessing NULL as array
set NULL offset 'test' to string 'wtf'
NULL offset 'test' = wtf
val after access = array (
'test' => 'wtf',
)
val before access = 'test'
Warning: Illegal string offset 'test' in /in/F8EOY on line 7
accessing string as array t
Warning: Illegal string offset 'test' in /in/F8EOY on line 8
set string offset 'test' to string 'wtf'
Warning: Illegal string offset 'test' in /in/F8EOY on line 10
string offset 'test' = w
val after access = 'west'
val before access = 123
accessing integer as array
Warning: Cannot use a scalar value as an array in /in/F8EOY on line 8
set integer offset 'test' to string 'wtf'
integer offset 'test' =
val after access = 123
val before access = true
accessing boolean as array
Warning: Cannot use a scalar value as an array in /in/F8EOY on line 8
set boolean offset 'test' to string 'wtf'
boolean offset 'test' =
val after access = true
val before access = 1.19999999999999995559108
accessing double as array
Warning: Cannot use a scalar value as an array in /in/F8EOY on line 8
set double offset 'test' to string 'wtf'
double offset 'test' =
val after access = 1.19999999999999995559108