What is upcoming in the new release of PHP, and why should I care?
What problems will these improvements help to solve?
Cheers,
Edit: After posting the question I have found these links that also provide some insight.
php NEWS -
http://cvs.php.net/viewvc.cgi/php-src/NEWS?view=markup
IBM - The future of PHP -
http://www.ibm.com/develo...
How do I install latest versions of PHP as Apache 2 module?
PHPIniDir directive throws error.
And what's more important, there's no php5apache2.dll file or similar in latest distributions of PHP!
Example distr php 5.3
Dmitri.
...
This topic expands on When do/should I use __construct(), __get(), __set(), and __call() in PHP? which talks about the __construct __get and __set magic methods.
As of PHP 5.3 there is a new Magic Method called __invoke. The __invoke method is called when a script tries to call an object as a function.
Now on research I have done for ...
I wonder what I should be carefull of updating PHP on Windows(with Apache). My current version is 5.2.9-2
My php folder is simply under C:\php
If I simply download and unzip the new version, 5.3, which is a little more significant than going from 5.2.8 to 5.2.9, I'm thinking I need to be carefull not to overwrite some files.
I'm think...
Is there a better/shorter way to write the whoAmI method in the following code? It seems a bit unnecessary to create a new object just to get the static class' name.
<?php
abstract class baseClass {
static function whoAmI() {
echo get_class(new static); // Making a new class just to get its name???
}
}
...
Hi guys,
Prior to PHP 5.3 I used to name interfaces/abstract classes like this:
abstract class Framework_Package_Subpackage_Abstract {}
Framework/Package/Subpackage/Abstract.php
interface Framework_Package_Subpackage_Interface {}
Framework/Package/Subpackage/Interface.php
Now with PHP 5.3 and using namespaces I can't use my conventi...
I am using checkdnsrr on Windows with PHP 5.3 and it always returns false.
dns_get_record, however, works.
echo ("test.com dns check: ". checkdnsrr("test.com","NS")); //false!!
print_r(dns_get_record("test.com",DNS_NS)); //returns the right data
Any ideas?
...
Does anyone have openid working in a PHP 5.3 installation? None of the libraries I've tried seem to be working.
...
I just installed PHP 5.3 and am weeding out consequent "deprecated" warnings.
It says session_unregister() is deprecated in:
session_unregister($serverWideUniqueIdCode);
and the replacement seems to be $_SESSION[].
So what would be the syntax with $_SESSION[] to express the same thing?
...
For my development environment I recently moved to PHP 5.3 w/ fastCGI on IIS from php 5.2 w/ ISAPI on IIS and when I have an error (such as function name is incorrect) I'm used to PHP reporting back FATAL ERROR etc... to the browser. Intermittently instead of receiving the error I receive a HTTP 500. If browsing with firefox this does ...
I've just upgraded to PHP 5.3 and started supporting an old website for a new client. It seems to use rather odd PHP code which I've not come across before.
Whilst trying to access $_GET or $_REQUEST variables, the developer has used the following: ${"variable_name"}
I get notices generated due to undefined variables (presumably becaus...
Hello, I was playing with the DateTime object in PHP 5.3 on my local machine and made something useful but my host (NFS) is only running 5.2 and doesn't plan to upgrade until 5.3.1 is out.
So my question is, is this code possible using 5.2?
Specifically, DateTime::getTimestamp doesn't exist in 5.2
The nicetime.php include is similar t...
I am attempting to implement Martin Fowler's class model for recurring events in PHP. The DateTime and DatePeriod PHP objects look like they might be a good fit for dealing with temporal expressions. The issue is that I need to be able to perform UNION, INTERSECT and DIFFERENCE operations on the DatePeriods so that I can calculate expres...
I've seen a solution for not having to rework usage of the ereg function for PHP 6:
http://stackoverflow.com/questions/737198/good-alternative-to-eregi-in-php
It uses if(!function_exists....
Is there a function that can be used in this way for ereg_replace?
ereg_replace("<!--.*-->","",$str);
ereg_replace("[^a-z,A-Z]", "", $str);
Th...
Hi,
I started developing sort of a mvc framweork on PHP5.3.0 for the static keyword, but since I'm here I said I should take advantage of the namespaces as well.
So I have something like this for the view:
namespace view
{
function load($filepath)
{
include($filepath);
}
function helper()
{
echo 'lo...
I'm trying to insert data into my SQlite3 database (this works via the command line).
I gave the data1.db file 777 permissions and still it says it's unable to open the file.
I get this error:
Warning: SQLite3::exec() [sqlite3.exec]: unable to open database file in /var/www/test.php on line 3
Using this code:
$db = new SQLite3('./da...
I just installed php 5.3.0 and it won't run php scripts utilizing short open tags like <?, only <?PHP
...
How can I make some ful-text searching in non-english texts with sqlite? I use php5.3, with pdo_sqlite.
CREATE VIRTUAL TABLE example USING FTS3(title TEXT, TOKENIZE icu hu_HU)
This one is dont throw an Exception, but just a 0 byte length .sqlite file has been created. I dont see any virtual table. Below this link, i read that pdo_sqli...
Hello,
I recently upgraded to xampp v1.7.2 which dumped PHP 5.3 on me. Along with that all my httpd.confs and php.ini's got wiped out (I had taken it for granted that this release will be an upgrade like all the earlier xampp releases). Anyway, it took me a while to reconfigure all the services - but now I've run into a funny problem....
I just upgraded to php5.3 and when I execute:
php myfile.php
I see the source code for myfile.php.
Any idea why this is happening? I've never seen anything like it before!
G-Man
...