Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82087 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96010 invoked from network); 7 Feb 2015 10:30:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2015 10:30:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 74.125.82.45 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 74.125.82.45 mail-wg0-f45.google.com Received: from [74.125.82.45] ([74.125.82.45:36541] helo=mail-wg0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/60-27738-359E5D45 for ; Sat, 07 Feb 2015 05:30:44 -0500 Received: by mail-wg0-f45.google.com with SMTP id x12so17943346wgg.4 for ; Sat, 07 Feb 2015 02:30:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=BrFTY2huMVbHzWNdK46IuDU5YPPdF3xrjyoRi29Jmgg=; b=gdLxY9J9k0vx8En/etw3WGoPkM8h/CrAQIIxk8N4U5WH/rGOoYF673u9MQ2NywT4Ia J/O+uxxKFsOpX5e4HJTaC1rJFV2NUatkOU/GXDRM1wMwzuKM5m+cjGSuXL/LUTkfsTZN kz0uOLJuDzP/knUECfmYVPY3leCzhfF21G+kqVBJd9SUB/j8C+SRymxvJghFnh+qiaX5 m6lsUTeAOq+3HV33mBjI+i7zGPRfwQyWfVvWjm+M0pPhDLSdCl6GdHJmxzOJeru8L+co 4mhSsMYpbu4tPAnU7EH5TEGbQMdIv0tGNfNGhDKtQnN9QgUiH2DcN3t4X64WYZdFQCvE wLKg== X-Gm-Message-State: ALoCoQnGIq001F4WWGy+PvSd4ala1ZefRIsVMFGoqrLAOJ4w2xA5A1lJOsdA/UP3uRBk1pl+7KHO MIME-Version: 1.0 X-Received: by 10.180.76.133 with SMTP id k5mr12429268wiw.30.1423305040995; Sat, 07 Feb 2015 02:30:40 -0800 (PST) Received: by 10.194.133.70 with HTTP; Sat, 7 Feb 2015 02:30:40 -0800 (PST) X-Originating-IP: [95.118.6.253] In-Reply-To: <54D562CC.3080403@lsces.co.uk> References: <54D562CC.3080403@lsces.co.uk> Date: Sat, 7 Feb 2015 11:30:40 +0100 Message-ID: To: Lester Caine Cc: PHP Internals Content-Type: multipart/alternative; boundary=f46d0435c014603c00050e7d0719 Subject: Re: [PHP-DEV] Pointers to understanding code base From: kontakt@beberlei.de (Benjamin Eberlei) --f46d0435c014603c00050e7d0719 Content-Type: text/plain; charset=UTF-8 On Sat, Feb 7, 2015 at 1:56 AM, Lester Caine wrote: > OK slowly getting back into raw code again ... > > Looking at imagick phpinfo problem ... > > > if (supported_formats) { > > for (i = 0; i < num_formats; i++) { > > smart_string_appends(&formats, > supported_formats[i]); > > if (i != (num_formats - 1)) { > > smart_string_appends(&formats, ", "); > > } > > IMAGICK_FREE_MAGICK_MEMORY(supported_formats[i]); > > } > > smart_string_0(&formats); > > #ifdef ZEND_ENGINE_3 > > php_info_print_table_row(2, "ImageMagick supported > formats", formats); > > #else > > php_info_print_table_row(2, "ImageMagick supported > formats", formats.s); > > #endif > > smart_string_free(&formats); > > IMAGICK_FREE_MAGICK_MEMORY(supported_formats); > > } > > This one of the few places I can find smart_string_appends used, and I > can't work out just where it's code is? Although what it should be doing > is fairly self explanatory ... except why the dropping of the .s for > ZEND_ENGINE_3 ? > I hope this is the right pointer. The String API changed completely in ZE3, see the Upgrading docs to PHPNG: https://wiki.php.net/phpng-upgrading#strings It takes much time wrapping your head around this new way, but I think in the end its better than before. > > supported_formats must have the list as it says there are 209 entries, > but why is there a problem doing something simple which works on the 5.x > builds. > > -- > Lester Caine - G8HFL > ----------------------------- > Contact - http://lsces.co.uk/wiki/?page=contact > L.S.Caine Electronic Services - http://lsces.co.uk > EnquirySolve - http://enquirysolve.com/ > Model Engineers Digital Workshop - http://medw.co.uk > Rainbow Digital Media - http://rainbowdigitalmedia.co.uk > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --f46d0435c014603c00050e7d0719--