Skip to content

Commit 3fbbcf7

Browse files
committed
Remove use of obsolete create_function()
1 parent 1bdc290 commit 3fbbcf7

6 files changed

+6
-6
lines changed

ext/oci8/tests/connect_scope_try1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ echo "Test 1\n";
2929

3030
// Make errors throw exceptions
3131

32-
set_error_handler(create_function('$x, $y', 'throw new Exception($y, $x);'));
32+
set_error_handler(function($x, $y) { throw new Exception($y, $x); });
3333

3434
try
3535
{

ext/oci8/tests/connect_scope_try2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ echo "Test 1\n";
2929

3030
// Make errors throw exceptions
3131

32-
set_error_handler(create_function('$x, $y', 'throw new Exception($y, $x);'));
32+
set_error_handler(function($x, $y) { throw new Exception($y, $x); });
3333

3434
try
3535
{

ext/oci8/tests/connect_scope_try3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ echo "Test 1\n";
2929

3030
// Make errors throw exceptions
3131

32-
set_error_handler(create_function('$x, $y', 'throw new Exception($y, $x);'));
32+
set_error_handler(function($x, $y) { throw new Exception($y, $x); });
3333

3434
try
3535
{

ext/oci8/tests/connect_scope_try4.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ echo "Test 1\n";
2929

3030
// Make errors throw exceptions
3131

32-
set_error_handler(create_function('$x, $y', 'throw new Exception($y, $x);'));
32+
set_error_handler(function($x, $y) { throw new Exception($y, $x); });
3333

3434
try
3535
{

ext/oci8/tests/connect_scope_try5.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ echo "Test 1\n";
2929

3030
// Make errors throw exceptions
3131

32-
set_error_handler(create_function('$x, $y', 'throw new Exception($y, $x);'));
32+
set_error_handler(function($x, $y) { throw new Exception($y, $x); });
3333

3434
try
3535
{

ext/oci8/tests/connect_scope_try6.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ echo "Test 1\n";
2929

3030
// Make errors throw exceptions
3131

32-
set_error_handler(create_function('$x, $y', 'throw new Exception($y, $x);'));
32+
set_error_handler(function($x, $y) { throw new Exception($y, $x); });
3333

3434
try
3535
{

0 commit comments

Comments
 (0)