note 120651 deleted from function.define by cmb
| From: | cmb@php.net | Date: | Sun, 06 Oct 2019 07:51:43 +0000 |
| Subject: | note 120651 deleted from function.define by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212474@lists.php.net to get a copy of this message | ||
Note Submitter: axew3 at axew3 dot com
----
Please, change this,
http://php.net/manual/en/function.define.php#119848
in favor of this one more correct if possible (thank you):
Php 7 - Define: "Defines a named constant at runtime. In PHP 7, array values are also
accepted."
But prior PHP 7, you can maybe do this, to pass an array elsewhere using define:
$to_define_array = serialize($array);
define( "DEFINEMYARRAY", $to_define_array );
... and so ...
$our_array = unserialize(DEFINEMYARRAY);
print_r($our_array);