# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types = 1); | |
namespace Acme\Infrastructure\MongoDb; | |
use MongoDB\Client; | |
use MongoDB\Collection; | |
class MongoConnection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@rizzo ~$ uname -a | |
FreeBSD rizzo.heimdall.pl 9.1-RELEASE FreeBSD 9.1-RELEASE #0: Wed Mar 13 21:02:32 CET 2013 root@rizzo.heimdall.pl:/sys/amd64/compile/rizzo amd64 | |
root@rizzo ~$ kldload opensolaris | |
root@rizzo ~$ kldload zfs | |
root@rizzo ~$ kldload geom_eli | |
root@rizzo ~$ gpart destroy -F da0 | |
da0 destroyed | |
root@rizzo ~$ gpart create -s gpt da0 | |
da0 created | |
root@rizzo ~$ gpart add -t freebsd-zfs -a 4096 da0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM codeship/ruby | |
MAINTAINER Dave Mox <dave.e.mox@gmail.com> | |
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
git \ | |
vim | |
COPY Makefile /src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[27-May-2014 14:10:18] WARNING: [pool rebuy] child 3963 said into stderr: "NOTICE: PHP message: PHP Fatal error: Uncaught exception 'Exception' with message 'test exception' in /foo/htdocs/index.php:4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import { compose, lifecycle, pure, StateHandler, StateHandlerMap, withStateHandlers } from 'recompose'; | |
import { Message, Transition } from 'semantic-ui-react'; | |
import './FlashMessage.css'; | |
export interface FlashMessageProps { | |
message: string; | |
isWarning?: boolean; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import subprocess | |
import sys | |
dir_path = os.path.dirname(os.path.realpath(__file__)) | |
subprocess.call('cat ' + sys.argv[-1] + ' | ' | |
+ os.path.join(dir_path, 'detex.py') + ' | ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types=1); | |
class Test | |
{ | |
private $arr = []; | |
public function __construct() | |
{ | |
for ( $i = 0; $i < 10000; $i++ ) | |
{ |
The final solution !!
Since the first version of pthreads, PHP has had the ability to initialize Worker threads for users. Onto those Worker threads are stacked objects of class Stackable for execution concurrently.
The objects stacked onto workers do not have their reference counts changed, pthreads forces the user to maintain the reference counts in userland, for the extremely good reason that this enables the programmer to keep control of memory usage; and so, execute indefinitely.
This is the cause of much heartache for newcomers to pthreads; if you do not maintain references properly you will, definitely, experience segmentation faults.