Skip to content

Instantly share code, notes, and snippets.

View auroraeosrose's full-sized avatar

Elizabeth M Smith auroraeosrose

View GitHub Profile
@auroraeosrose
auroraeosrose / ansible.yml
Created October 27, 2022 14:52
apt-key is deprecated
- name: Get PHP GPG key - I hate ubuntu
command: gpg --homedir /tmp --no-default-keyring --keyring /tmp/php.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C
- name: Export keybox format
shell: gpg --no-default-keyring --keyring /tmp/php.gpg --export > /etc/apt/trusted.gpg.d/php.gpg
- name: Install PHP repository
apt_repository:
repo: "deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu {{ ansible_distribution_release }} main"
state: present
This is only showing up right NOW for me in IIS10 with Fastcgi and PHP 7.2
This is NOT broken in PHP 7.1, so I'd argue this is a regression somewhere
<?php
//header('HTTP/1.1 403 Forbidden');
//header('HTTP/1.1 403 Forbidden', true, 403);
http_response_code(403);
Any line but the last gives me a 200 OK response
If you run the header code and then try to set the http_response_code you can't
PHP Extensions Tutorial
The best way to learn about writing extensions is - to write an
extension! If you want to "code along", you'll need to be set up to
compile PHP 7 extensions, have a checkout of the example code we'll be
using, and have the C library we'll be "wrapping" available on your
system.
All the code we'll be working with is available from
https://github.com/auroraeosrose/php-extensions-code
1. create a culture of sharing teaching in phpmentoring
a. getting a blog set up
b. teaching the channel to capture and create an issue for each good conversation we get in phpmentoring
c. cultivate getting members to write up these into blog posts
d. cultivating more good discussions in phpmentoring channel
2. Some marketing for phpmentoring
a. the blog on a roll - once a week would be great but my real goal is daily (well not on weekends) posts
b. logo and design done - integrate into the site
c. stickers and possibly other swag for those who attend conferences
d. some community push for "this is what we do and why, come be a part of it"
Verifying that +auroraeosrose is my blockchain ID. https://onename.com/auroraeosrose
<?php
use Eos\Datastructures\Immutable;
use Eos\Datastructures\Struct;
class Rectangle extends Struct implements Immutable {
public $x;
public $y;
public $height;
public $width;
}
<?php
// Basically a strict object with no methods
class Struct {
public $foo;
public $bar;
}
$struct = new Struct(['foo' => 'something']); // constructor args would get pushed to properties ???
$struct->foo = 'whatever';
@auroraeosrose
auroraeosrose / gist:d038ec0f9fc82985fe06
Created February 26, 2015 16:36
Go PHP7(ext) - What we're doing

A quick snapshot of what is going on with the project - for the tl;dr see "what can I do?"

What is complete

  1. A name- GoPHP7 is a project (not yet really started) to motivate people to migrate to PHP7 when it's released. This echoes the GoPHP5 project of the past
  2. An irc channel - registered on freenode - owner auroraeosrose, ops lornajane, ircmaxell and joepferguson
  3. A set of goals - see http://goo.gl/BJ3s8D

What is in process

  1. Getting "adminy" stuff set up (lornajane is in charge) - This will include website, wikis, twitter, whatever, and other tools
PHP7 is coming
And it's breaking all of our extensions
There are currently more changes to the internal apis than there are to things that users will see (and there are enough of those)
In fact not even all the extensions in php source proper are all the way PHP7'd - most of PECL and extensions hosted elsewhere haven't even started! Heck half don't have maintainers!
Extensions are also notorious for poor api design, poor testing, and non-existent docs
But they're also powerful, useful, and fast and more people should use them
PHP7 is coming - fast - and we have a chance to "break" things and to get the community interested and involved
@auroraeosrose
auroraeosrose / gist:b17c03728ccda9162d2b
Created September 24, 2014 18:14
That pcntl patch I've been sitting on
Index: config.w32
===================================================================
--- config.w32 (revision 0)
+++ config.w32 (revision 0)
@@ -0,0 +1,8 @@
+// $Id: config.w32 264053 2008-08-01 21:20:08Z pajoye $
+// vim:ft=javascript
+
+ARG_ENABLE("pcntl", "process control support", "no");
+