com php-src: Remove example PHP script from FFI: ext/ffi/example.php

From: Date: Wed, 08 May 2019 19:55:59 +0000
Subject: com php-src: Remove example PHP script from FFI: ext/ffi/example.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106083@lists.php.net to get a copy of this message
Commit: 05350e621b7d14822719195096ced34e2da23dd6 Author: Peter Kokot <peterkokot@gmail.com> Mon, 6 May 2019 01:40:15 +0200 Parents: 4eb67310a0b0f8daddf4edc1f8e41a3dae648953 Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=05350e621b7d14822719195096ced34e2da23dd6 Log: Remove example PHP script from FFI FFI README.md already includes the PHP example with more information. Changed paths: D ext/ffi/example.php Diff: diff --git a/ext/ffi/example.php b/ext/ffi/example.php deleted file mode 100644 index 0b82e25..0000000 --- a/ext/ffi/example.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -$ffi = FFI::cdef(" - - int printf(const char *format, ...); - const char * getenv(const char *); - unsigned int time(unsigned int *); - - typedef unsigned int time_t; - typedef unsigned int suseconds_t; - - struct timeval { - time_t tv_sec; - suseconds_t tv_usec; - }; - - struct timezone { - int tz_minuteswest; - int tz_dsttime; - }; - - int gettimeofday(struct timeval *tv, struct timezone *tz); - ", "libc.so.6"); - -var_dump($ffi->printf("Hello World from %s!\n", "PHP")); -var_dump($ffi->getenv("PATH")); -var_dump($ffi->time(null)); - -$tv = $ffi->new("struct timeval"); -$tz = $ffi->new("struct timezone"); -var_dump($ffi->gettimeofday(FFI::addr($tv), FFI::addr($tz))); -var_dump($tv, $tz);

« previous php.cvs (#106083) next »