That's what I thought.
naderman wrote:You can reference zvals.
This is the truth, and a case of major abstraction leakage.
I knew intuitively that references were broken for quite some time, now I understand why they are. It all makes sense now: passing by reference, returning references, reference bugs labeled as features, etc.
Even perl gets them right:
Code: Select all
% perl -e '$a = \4; print $$a."\n";'
4
And this is the original code.
Code: Select all
<?php
date_default_timezone_set('UTC');
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = 'php';
include($phpbb_root_path . 'common.' . $phpEx);
$user->date_format = '%b %m %Y | %b %m %Y';
$user->lang['datetime'] = '%b %m %Y';
$user->timezone = 'America/New_York';
print $user->format_date(time());
Here I am trying to test some timezone-related behavior, guessing what I need to do to bootstrap enough of phpbb so that format_date runs.