]> granicus.if.org Git - php/commitdiff
Remove superfluous checks of always available functions
authorGabriel Caruso <carusogabriel34@gmail.com>
Fri, 3 Aug 2018 03:13:01 +0000 (00:13 -0300)
committerGabriel Caruso <carusogabriel34@gmail.com>
Fri, 3 Aug 2018 03:13:01 +0000 (00:13 -0300)
ext/filter/tests/033_run.inc
ext/mbstring/tests/overload01.phpt
ext/mbstring/tests/overload02.phpt
ext/openssl/tests/openssl_free_key.phpt
ext/phar/tests/cache_list/files/phar_test.inc
ext/phar/tests/files/phar_test.inc
ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt
ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt
ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt
run-tests.php

index ecb2cf7be160d4b16758f590d9eeb6be3e235cde..30a7a82a011cc52a7108767f87fb3118cfb3f6a3 100644 (file)
@@ -1,7 +1,5 @@
 <?php
-if (function_exists('setlocale')) {
-       setlocale(LC_ALL, 'C');
-}
+setlocale(LC_ALL, 'C');
 
 function test($data) {
   return strtoupper($data);
index 7efc65da8261cb575fc7ffcb7f7109eb151e34dc..8950d912fb9257cbfadef26a1fa28244fc219108 100644 (file)
@@ -3,9 +3,6 @@ Function overloading test 1
 --SKIPIF--
 <?php 
        extension_loaded('mbstring') or die('skip mbstring not available'); 
-       if (!function_exists("mail")) {
-               die('skip mail() function is not available.');
-       }
 ?>
 --INI--
 output_handler=
index 48705b782b2885da73bd5fcfe2a235821d1c9650..64b46dfd7374352ef32727ed9278c2da7c5ccb68 100644 (file)
@@ -3,9 +3,6 @@ Function overloading test 2
 --SKIPIF--
 <?php 
        extension_loaded('mbstring') or die('skip mbstring not available'); 
-       if (!function_exists("mail")) {
-               die('skip mail() function is not available.');
-       }
        if (!function_exists("mb_ereg_replace")) {
                die('skip mb_ereg_replace() function is not available.');
        }
index ea79ce703a98aa67a32449da06cb402c06898d14..aa4a3a8a35fe2c13256b932c1d39ca5a68d902fa 100644 (file)
@@ -18,8 +18,7 @@ echo "Creating private key\n";
  */
 for ($z = "", $i = 0; $i < 1024; $i++) {
     $z .= $i * $i;
-    if (function_exists("usleep"))
-        usleep($i);
+    usleep($i);
 }
 
 $conf = array('config' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'openssl.cnf');
index f82471d13b4cbeba7379448547db4bd1f918c44d..047f4ea0515a077ece43639d20874073ae66cef4 100644 (file)
@@ -1,8 +1,6 @@
 <?php
 
-if (function_exists('date_default_timezone_set')) {
-       date_default_timezone_set('UTC');
-}
+date_default_timezone_set('UTC');
 
 $manifest = (binary)'';
 $glags = 0;
index 6f939695422ed69e1f6db147b8ae61e9d1a3839d..6a75334cdd0c2204bc3f6e4e95609a634e0418b8 100644 (file)
@@ -1,8 +1,6 @@
 <?php
 
-if (function_exists('date_default_timezone_set')) {
-       date_default_timezone_set('UTC');
-}
+date_default_timezone_set('UTC');
 
 $manifest = (binary)'';
 $gflags = 0;
index 22bab4eae3fcfd86a32d267d59672e81d15088c4..d8f91d328e2bc8262304b5f17393f023570db261 100644 (file)
@@ -2,7 +2,6 @@
 SOAP Interop Round2 base 005 (php/direct): echoString(utf-8)
 --SKIPIF--
 <?php require_once('skipif.inc'); ?>
-<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?>
 --FILE--
 <?php
 $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0));
index f94c06f58c318e41e1aefc654c6a62f09a4493ff..116e14faac0850ca5a206d3354eced915ef807b7 100644 (file)
@@ -2,7 +2,6 @@
 SOAP Interop Round2 base 005 (soap/direct): echoString(utf-8)
 --SKIPIF--
 <?php require_once('skipif.inc'); ?>
-<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?>
 --FILE--
 <?php
 $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0));
index 3bb1368b97b196de649b3cbc573a116ffb7476a3..728b4f5c58bf3e72ccf7910fd8f5c558270b70f2 100644 (file)
@@ -2,7 +2,6 @@
 SOAP Interop Round2 base 005 (php/wsdl): echoString(utf-8)
 --SKIPIF--
 <?php require_once('skipif.inc'); ?>
-<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?>
 --INI--
 soap.wsdl_cache_enabled=0
 --FILE--
index c47770ca066ccc87787a0bdca52dc20de5b2fea9..554f014a25ede3ecd3d7a9a4e5cd69b6539058a5 100644 (file)
@@ -205,7 +205,7 @@ function verify_config()
                error('environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable!');
        }
 
-       if (function_exists('is_executable') && !is_executable($php)) {
+       if (!is_executable($php)) {
                error("invalid PHP executable specified by TEST_PHP_EXECUTABLE  = $php");
        }
 }