austinhyde / iniparser Goto Github PK
View Code? Open in Web Editor NEWA PHP INI file parser supporting section inheritance, property nesting, and simple arrays
License: MIT License
A PHP INI file parser supporting section inheritance, property nesting, and simple arrays
License: MIT License
Hi there-- will you please add this package to https://packagist.org so that projects can use it using composer? Please please please?
Thank you!
Hey!
Can you provide your project to Packagist? And add some instructions in the documentation to install via composer?
Thanks ;)
Hi!
We are testing PHP7.4 and there's a deprecated feature:
https://www.php.net/manual/es/migration74.deprecated.php#migration74.deprecated.core.array-key-exists-objects
So, in our system, the line https://github.com/austinhyde/IniParser/blob/master/src/IniParser.php#L197 is throwing this error:
Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in C:\inetpub\wwwroot\intranet\3rdparty\IniParser\vendor\austinhyde\iniparser\src\IniParser.php on line 197
Our idea, to fix it without too much research would be to implement a private method:
private static function array_key_exists($key_or_property, $array_or_class) { return is_object($array_or_class) ? property_exists($array_or_class, $key_or_property) : array_key_exists($key_or_property, $array_or_class); }
and replace all the array_key_exists calls for self::array_key_exists
Thank you very much in advance for your help!
Warning: array_key_exists() expects parameter 2 to be array, string given in /xxxxx/IniParser.php on line 151
Fatal error: Cannot create references to/from string offsets nor overloaded objects in /xxxxxxxxx/IniParser.php on line 158
when I use good old
a[] = 1
a[] = 2
a[] = "c"
in the INI file, while parse_ini_file() has no issues with it and gives the desired result
PHP 5.4.6, Ubuntu 12.10
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.