Bug #68233 [NEW]: gettype doesn`t get the type of parsable string created by var_export

From: Date: Wed, 15 Oct 2014 11:47:43 +0000
Subject: Bug #68233 [NEW]: gettype doesn`t get the type of parsable string created by var_export
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188096@lists.php.net to get a copy of this message
From: mohit dot cse07 at gmail dot com Operating system: LINUX PHP version: 5.5.17 Package: *General Issues Bug Type: Bug Bug description:gettype doesn`t get the type of parsable string created by var_export Description: ------------ I need to check the type of variable before proceeding my next operation, for this i used "gettype". But it output as NULL, expected to return as String. NOTE : I have also used var_export to change the type into parsable string. Please check if it is a bug or i`m doing something wrong. Thank you regards Mohit Test script: --------------- <?php $testArray = array(1,2,'mohit'); $parsableString = var_export($testArray); echo gettype($parsableString); ?> Expected result: ---------------- string Actual result: -------------- NULL -- Edit bug report at https://bugs.php.net/bug.php?id=68233&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68233&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68233&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68233&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68233&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68233&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68233&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68233&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68233&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68233&r=support Expected behavior: https://bugs.php.net/fix.php?id=68233&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68233&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68233&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68233&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68233&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68233&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68233&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68233&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68233&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68233&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68233&r=mysqlcfg

« previous php.bugs (#188096) next »