Last active
September 27, 2022 01:36
-
-
Save yammerjp/a7877bf2f8de9ec99dd08a87e7dd0efb to your computer and use it in GitHub Desktop.
A simple patch as an experiment to modify the comparison operations in PHP 7.4.30 ... https://github.com/php/php-src/tree/PHP-7.4.30
This file contains hidden or 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
| diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c | |
| index 031894755c..2e945575d3 100644 | |
| --- a/Zend/zend_operators.c | |
| +++ b/Zend/zend_operators.c | |
| @@ -2098,6 +2098,10 @@ ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) | |
| ZVAL_LONG(result, -1); | |
| return SUCCESS; | |
| + case TYPE_PAIR(IS_TRUE, IS_STRING): | |
| + ZVAL_LONG(result, -1); | |
| + return SUCCESS; | |
| + | |
| default: | |
| if (Z_ISREF_P(op1)) { | |
| op1 = Z_REFVAL_P(op1); |
This file contains hidden or 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 ubuntu:20.04 | |
| WORKDIR /root | |
| # apt-get installでtzdataがインストールされるときにタイムゾーンを聞かれるの でいい感じに回避 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN echo 'tzdata tzdata/Areas select Asia' | debconf-set-selections | |
| RUN echo 'tzdata tzdata/Zones/Europe select Tokyo' | debconf-set-selections | |
| # git以外はPHPのREADMEをみて必要そうなのでいれておく \ | |
| RUN apt-get update && \ | |
| apt-get upgrade -y && \ | |
| apt-get install -y \ | |
| git \ | |
| pkg-config \ | |
| build-essential \ | |
| autoconf \ | |
| bison \ | |
| re2c \ | |
| libxml2-dev \ | |
| libsqlite3-dev && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN git clone https://github.com/php/php-src.git | |
| WORKDIR /root/php-src | |
| RUN git checkout php-7.4.30 | |
| RUN ./buildconf --force # forceをつけないと進めなかった | |
| RUN ./configure | |
| RUN make install |
This file contains hidden or 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 ubuntu:20.04 | |
| WORKDIR /root | |
| # apt-get installでtzdataがインストールされるときにタイムゾーンを聞かれるの でいい感じに回避 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN echo 'tzdata tzdata/Areas select Asia' | debconf-set-selections | |
| RUN echo 'tzdata tzdata/Zones/Europe select Tokyo' | debconf-set-selections | |
| # git以外はPHPのREADMEをみて必要そうなのでいれておく \ | |
| RUN apt-get update && \ | |
| apt-get upgrade -y && \ | |
| apt-get install -y \ | |
| git \ | |
| pkg-config \ | |
| build-essential \ | |
| autoconf \ | |
| bison \ | |
| re2c \ | |
| libxml2-dev \ | |
| libsqlite3-dev && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN git clone https://github.com/php/php-src.git | |
| WORKDIR /root/php-src | |
| RUN git checkout php-7.4.30 | |
| RUN ./buildconf --force # forceをつけないと進めなかった | |
| RUN ./configure | |
| RUN make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment