3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public function __toString() { return spl_object_hash($this); } } $a[(string) new Foo()] = 'bar'; var_dump($a);
Output for 7.1.0
array(1) { ["0000000039352e4c000000004a6b7d98"]=> string(3) "bar" }
Output for 7.0.14
array(1) { ["00000000095619080000000053ab49fd"]=> string(3) "bar" }
Output for 7.0.12
array(1) { ["000000004d624df7000000002c7db138"]=> string(3) "bar" }
Output for 7.0.6
array(1) { ["00000000275d8c95000000003157e76d"]=> string(3) "bar" }
Output for 7.0.5
array(1) { ["0000000018eec92900000000605a7041"]=> string(3) "bar" }
Output for 7.0.4
array(1) { ["000000002606f5b4000000000cb181ca"]=> string(3) "bar" }
Output for 7.0.3
array(1) { ["00000000318120830000000026023e6c"]=> string(3) "bar" }
Output for 7.0.2
array(1) { ["000000005c28c25300000000224dbf24"]=> string(3) "bar" }
Output for 7.0.1
array(1) { ["0000000070a601e600000000073162ad"]=> string(3) "bar" }
Output for 7.0.0
array(1) { ["000000004e0cc1ed000000004431f338"]=> string(3) "bar" }
Output for 5.6.28
array(1) { ["00000000569be7e70000000014753e08"]=> string(3) "bar" }
Output for 5.6.21
array(1) { ["000000003d2c5616000000003a8a5b24"]=> string(3) "bar" }
Output for 5.6.20
array(1) { ["0000000008f397e70000000007f15e73"]=> string(3) "bar" }
Output for 5.6.19
array(1) { ["00000000778fc7f400000000296eeae4"]=> string(3) "bar" }
Output for 5.6.18
array(1) { ["0000000007bba7450000000023a168ec"]=> string(3) "bar" }
Output for 5.6.17
array(1) { ["000000003aaabfe70000000004a89bc0"]=> string(3) "bar" }
Output for 5.6.16
array(1) { ["0000000050677738000000000cc84c2e"]=> string(3) "bar" }
Output for 5.6.15
array(1) { ["0000000049dba032000000003ab2e87e"]=> string(3) "bar" }
Output for 5.6.14
array(1) { ["000000005115e85d000000003c7e87a7"]=> string(3) "bar" }
Output for 5.6.13
array(1) { ["0000000071d3ba370000000051a408a5"]=> string(3) "bar" }
Output for 5.6.12
array(1) { ["000000003cb86b4b00000000616ba4f0"]=> string(3) "bar" }
Output for 5.6.11
array(1) { ["00000000576901cd0000000078387769"]=> string(3) "bar" }
Output for 5.6.10
array(1) { ["00000000222d43890000000037b791d5"]=> string(3) "bar" }
Output for 5.6.9
array(1) { ["000000005926cbe60000000063af0470"]=> string(3) "bar" }
Output for 5.6.8
array(1) { ["0000000059d67cd70000000014a8b679"]=> string(3) "bar" }
Output for 5.5.35
array(1) { ["000000006f8a2e06000000003b493687"]=> string(3) "bar" }
Output for 5.5.34
array(1) { ["0000000034001e3e000000006ebe08f8"]=> string(3) "bar" }
Output for 5.5.33
array(1) { ["0000000045cf2694000000007766027a"]=> string(3) "bar" }
Output for 5.5.32
array(1) { ["000000007f8bb115000000003a324cbe"]=> string(3) "bar" }
Output for 5.5.31
array(1) { ["000000000d628185000000003f2a939c"]=> string(3) "bar" }
Output for 5.5.30
array(1) { ["000000005d410f6f000000001fd8e57e"]=> string(3) "bar" }
Output for 5.5.29
array(1) { ["00000000653e86de000000005e367d62"]=> string(3) "bar" }
Output for 5.5.28
array(1) { ["0000000063e2fc8d0000000074629934"]=> string(3) "bar" }
Output for 5.5.27
array(1) { ["00000000410e2f51000000004d49a8ff"]=> string(3) "bar" }
Output for 5.5.26
array(1) { ["000000005623c54f0000000026d9285e"]=> string(3) "bar" }
Output for 5.5.25
array(1) { ["000000004b73ed7c0000000007fb21a1"]=> string(3) "bar" }
Output for 5.5.24
array(1) { ["000000002bbbb9450000000061d8b36f"]=> string(3) "bar" }
Output for 5.4.45
array(1) { ["0000000023686cb90000000017147425"]=> string(3) "bar" }
Output for 5.4.44
array(1) { ["000000002ad71dc5000000000dcc5b6d"]=> string(3) "bar" }
Output for 5.4.43
array(1) { ["000000003e9b0221000000002d160106"]=> string(3) "bar" }
Output for 5.4.42
array(1) { ["0000000065a3431600000000660056e2"]=> string(3) "bar" }
Output for 5.4.41
array(1) { ["0000000072846f1300000000156700c8"]=> string(3) "bar" }
Output for 5.4.40
array(1) { ["0000000006b959cd000000006480d07f"]=> string(3) "bar" }
Output for 5.4.39
array(1) { ["00000000459292ee0000000051d4b33f"]=> string(3) "bar" }
Output for 5.4.38
array(1) { ["0000000014e1bfe900000000007421b1"]=> string(3) "bar" }
Output for 5.4.37
array(1) { ["000000004951125e0000000059407a48"]=> string(3) "bar" }
Output for 5.4.36
array(1) { ["0000000067128d69000000005bd1eba6"]=> string(3) "bar" }
Output for 5.4.35
array(1) { ["00000000271764c1000000000c7d12dc"]=> string(3) "bar" }
Output for 5.4.34
array(1) { ["000000000f8418fd00000000727288e2"]=> string(3) "bar" }
Output for 5.4.32
array(1) { ["000000001327383c0000000015606e63"]=> string(3) "bar" }
Output for 5.4.31
array(1) { ["0000000050e93fca0000000055473ecf"]=> string(3) "bar" }
Output for 5.4.30
array(1) { ["000000006c607a18000000005ca93773"]=> string(3) "bar" }
Output for 5.4.29
array(1) { ["00000000208f8fcb0000000056663c46"]=> string(3) "bar" }
Output for 5.4.28
array(1) { ["0000000001aa33ce00000000275751c1"]=> string(3) "bar" }
Output for 5.4.27
array(1) { ["00000000655caa61000000002681d94b"]=> string(3) "bar" }
Output for 5.4.26
array(1) { ["000000002ed22da8000000000805df63"]=> string(3) "bar" }
Output for 5.4.25
array(1) { ["00000000180e9414000000007a6604a5"]=> string(3) "bar" }
Output for 5.4.24
array(1) { ["000000004eb5dcb3000000005d468e8d"]=> string(3) "bar" }
Output for 5.4.23
array(1) { ["0000000063fb44fa000000000897a4a3"]=> string(3) "bar" }
Output for 5.4.22
array(1) { ["0000000042c9e5450000000002d0fae0"]=> string(3) "bar" }
Output for 5.4.21
array(1) { ["000000003e04c4fe000000003d3ec868"]=> string(3) "bar" }
Output for 5.4.20
array(1) { ["00000000515e260a000000006261a120"]=> string(3) "bar" }
Output for 5.4.19
array(1) { ["0000000057c53bfb0000000024d51b69"]=> string(3) "bar" }
Output for 5.4.18
array(1) { ["000000002f0143ea00000000086dce1f"]=> string(3) "bar" }
Output for 5.4.17
array(1) { ["000000002071c3d1000000001556cb34"]=> string(3) "bar" }
Output for 5.4.16
array(1) { ["000000006e57e1a800000000495ecb4e"]=> string(3) "bar" }
Output for 5.4.15
array(1) { ["000000004b5fed070000000059946b8e"]=> string(3) "bar" }
Output for 5.4.14
array(1) { ["000000000c25ae7e0000000021dfcc05"]=> string(3) "bar" }
Output for 5.4.13
array(1) { ["000000006723d11900000000580a14f5"]=> string(3) "bar" }
Output for 5.4.12
array(1) { ["000000004c2c0be6000000003306b232"]=> string(3) "bar" }
Output for 5.4.11
array(1) { ["0000000041aa8109000000007f07e544"]=> string(3) "bar" }
Output for 5.4.10
array(1) { ["00000000216fa01600000000112d73e9"]=> string(3) "bar" }
Output for 5.4.9
array(1) { ["000000004e4fa65b000000005e03a9bc"]=> string(3) "bar" }
Output for 5.4.8
array(1) { ["0000000079be7d7500000000323ad09f"]=> string(3) "bar" }
Output for 5.4.7
array(1) { ["00000000552c45de0000000017036dad"]=> string(3) "bar" }
Output for 5.4.6
array(1) { ["000000005d18a9c4000000005d1f1a5f"]=> string(3) "bar" }
Output for 5.4.5
array(1) { ["0000000006a2e2d1000000001a0bedf5"]=> string(3) "bar" }
Output for 5.4.4
array(1) { ["000000003f8386e8000000003c5c6c6a"]=> string(3) "bar" }
Output for 5.4.3
array(1) { ["000000004944eb900000000073a0a2e0"]=> string(3) "bar" }
Output for 5.4.2
array(1) { ["0000000059df5c24000000005a31a159"]=> string(3) "bar" }
Output for 5.4.1
array(1) { ["0000000065bca771000000005fcf2c8b"]=> string(3) "bar" }
Output for 5.4.0
array(1) { ["0000000029c9632f0000000054c17219"]=> string(3) "bar" }
Output for 5.3.29
array(1) { ["00000000352a1bc80000000078564aa6"]=> string(3) "bar" }
Output for 5.3.28
array(1) { ["00000000091c493a0000000061995939"]=> string(3) "bar" }
Output for 5.3.27
array(1) { ["000000002931432400000000307d2c1c"]=> string(3) "bar" }
Output for 5.3.26
array(1) { ["000000005000080a0000000041daaa67"]=> string(3) "bar" }
Output for 5.3.25
array(1) { ["000000000701e2d30000000049481ab6"]=> string(3) "bar" }
Output for 5.3.24
array(1) { ["000000006a89c31b000000003f76fd54"]=> string(3) "bar" }
Output for 5.3.23
array(1) { ["0000000032e859ee0000000060f8bd94"]=> string(3) "bar" }
Output for 5.3.22
array(1) { ["00000000793030a40000000024b8c01b"]=> string(3) "bar" }
Output for 5.3.21
array(1) { ["000000006c0e6ea4000000003520b661"]=> string(3) "bar" }
Output for 5.3.20
array(1) { ["0000000059a76c3f000000002b97541d"]=> string(3) "bar" }
Output for 5.3.19
array(1) { ["000000000cefcedc0000000067d15e7d"]=> string(3) "bar" }
Output for 5.3.18
array(1) { ["0000000059b0f765000000001fb861ea"]=> string(3) "bar" }
Output for 5.3.17
array(1) { ["000000002455192400000000497c00ff"]=> string(3) "bar" }
Output for 5.3.16
array(1) { ["0000000050ae42cb000000004cca94f1"]=> string(3) "bar" }
Output for 5.3.15
array(1) { ["000000006ead14eb00000000127f043d"]=> string(3) "bar" }
Output for 5.3.14
array(1) { ["000000002713e026000000004f38c1c2"]=> string(3) "bar" }
Output for 5.3.13
array(1) { ["000000006edcc7670000000061a76569"]=> string(3) "bar" }
Output for 5.3.12
array(1) { ["000000000175aa2700000000794a9a11"]=> string(3) "bar" }
Output for 5.3.11
array(1) { ["000000005418ad250000000076380719"]=> string(3) "bar" }
Output for 5.3.10
array(1) { ["000000005fe01662000000005064a16b"]=> string(3) "bar" }
Output for 5.3.9
array(1) { ["000000005e7892920000000042533715"]=> string(3) "bar" }
Output for 5.3.8
array(1) { ["000000005af8085800000000204cccd8"]=> string(3) "bar" }
Output for 5.3.7
array(1) { ["000000001f4e6d49000000003fed9741"]=> string(3) "bar" }
Output for 5.3.6
array(1) { ["000000006ee65f5e0000000010cbf227"]=> string(3) "bar" }
Output for 5.3.5
array(1) { ["000000005b240a24000000002b41e6fc"]=> string(3) "bar" }
Output for 5.3.4
array(1) { ["0000000037968d8c00000000567ca331"]=> string(3) "bar" }
Output for 5.3.3
array(1) { ["000000006776078d0000000004c8bbbb"]=> string(3) "bar" }
Output for 5.3.2
array(1) { ["00000000457ff46b00000000058c3b62"]=> string(3) "bar" }
Output for 5.3.1
array(1) { ["0000000048a2a71a000000002ff40244"]=> string(3) "bar" }
Output for 5.3.0
array(1) { ["000000003d732f29000000003cb96c9a"]=> string(3) "bar" }
Output for 5.2.17
array(1) { ["861a2f056a593edc2697eec710327754"]=> string(3) "bar" }
Output for 5.2.15 - 5.2.16
array(1) { ["bab3da487bfe51e3bada7ed6962c83d7"]=> string(3) "bar" }
Output for 5.2.14
array(1) { ["6827d7150a80a95428b05b2dbc0dcb10"]=> string(3) "bar" }
Output for 5.2.13
array(1) { ["4d9da188dd696504eef8aed3fde97e02"]=> string(3) "bar" }
Output for 5.2.12
array(1) { ["617357606fc417e758728410d8dad7f3"]=> string(3) "bar" }
Output for 5.2.9, 5.2.11
array(1) { ["52ee78937c6a89104904aed13987318e"]=> string(3) "bar" }
Output for 5.2.10
array(1) { ["efe88f76f26081279f31ba49d381104e"]=> string(3) "bar" }
Output for 5.2.7 - 5.2.8
array(1) { ["af89ab9ae8be1068e0d8dc48e55bfcd1"]=> string(3) "bar" }
Output for 5.2.6
array(1) { ["950969556ed71c6f363f434ecae32954"]=> string(3) "bar" }
Output for 5.2.5
array(1) { ["a7965ec2cba63ba225597f43def8a4b6"]=> string(3) "bar" }
Output for 5.2.4
array(1) { ["7ebbed9ad06ebcbd0c3782f6cdf89b51"]=> string(3) "bar" }
Output for 5.2.3
array(1) { ["dc90896f8dce368265954f0524e2a853"]=> string(3) "bar" }
Output for 5.2.2
array(1) { ["d1877c094161b942518f0f010b1a5be5"]=> string(3) "bar" }
Output for 5.2.1
array(1) { ["5663e593b52467eb39485ab4532cfb71"]=> string(3) "bar" }
Output for 5.2.0
array(1) { ["73f03f2749114a53db076b2f4bc47285"]=> string(3) "bar" }
Output for 5.0.0 - 5.1.6
array(1) { ["Object id #1"]=> string(3) "bar" }
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/04HQG on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/04HQG on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/04HQG on line 6
Process exited with code 255.