Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Punt tpunt

View GitHub Profile
@tpunt
tpunt / zend_language_parser.c
Created Feb 26, 2018
Generated PHP Language Parser
View zend_language_parser.c
/* A Bison parser, made by GNU Bison 2.7.12-4996. */
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@tpunt
tpunt / doc.md
Last active Oct 8, 2018
PHP 7.2 Migration Guide ToDo's
View doc.md

Incompatibilities:

  • Session:
    • Removed register_globals related code and "!" can be used as $_SESSION key name.
    • Session is made to manage session status correctly and prevents invalid operations. Only inappropriate codes are affected by this change. If you have problems with this, it means you have problem in your code.
      • Functions are made to set or return correct session status. session_start(), session_status(), session_regenerate_id()
      • Functions are made to return bool from null. These functions have void parameter
@tpunt
tpunt / example.php
Created Jul 24, 2015
Backporting PHP 7 string type declaration to PHP 5
View example.php
<?php
// in coercive mode
// PHP 7 func
function foo(string $bar)
{
return $bar;
}