Skip to content

Instantly share code, notes, and snippets.

View tpunt's full-sized avatar

Thomas Punt tpunt

View GitHub Profile
@tpunt
tpunt / zend_language_parser.c
Created February 26, 2018 19:37
Generated PHP Language Parser
/* 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 October 8, 2018 06:57
PHP 7.2 Migration Guide ToDo's

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 July 24, 2015 18:12
Backporting PHP 7 string type declaration to PHP 5
<?php
// in coercive mode
// PHP 7 func
function foo(string $bar)
{
return $bar;
}