<?php
$arr = array(
array('iso'=>'A3+', 'height'=>329, 'width'=>483, 'descrip'=>'A3+ (329 x 483 mm)'),
array('iso'=>'A3_EXTRA', 'height'=>322, 'width'=>445, 'descrip'=>'A3 EXTRA (322 x 445 mm)'),
array('iso'=>'A3_SUPER', 'height'=>305, 'width'=>508, 'descrip'=>'A3 SUPER (305 x 508 mm)'),
array('iso'=>'SUPER_A3', 'height'=>305, 'width'=>487, 'descrip'=>'SUPER A3 (305 x 487 mm)'),
array('iso'=>'A4_EXTRA', 'height'=>235, 'width'=>322, 'descrip'=>'A4 EXTRA (235 x 322 mm)'),
array('iso'=>'A4_SUPER', 'height'=>229, 'width'=>322, 'descrip'=>'A4 SUPER (229 x 322 mm)'),
array('iso'=>'SUPER_A4', 'height'=>227, 'width'=>356, 'descrip'=>'SUPER A4 (227 x 356 mm)'),
array('iso'=>'A4_LONG', 'height'=>210, 'width'=>348, 'descrip'=>'A4 LONG (210 x 348 mm)'),
array('iso'=>'F4', 'height'=>210, 'width'=>330, 'descrip'=>'F4 (210 x 330 mm)'),
array('iso'=>'SO_B5_EXTRA', 'height'=>202, 'width'=>276, 'descrip'=>'SO B5 EXTRA (202 x 276 mm)'),
array('iso'=>'A5_EXTRA', 'height'=>173, 'width'=>235, 'descrip'=>'A5 EXTRA (173 x 235 mm)'),
array('iso'=>'ANSI_E', 'height'=>863.6, 'width'=>1117.6, 'descrip'=>'ANSI E (863.6 x 1117.6 mm)'),
array('iso'=>'ANSI_D', 'height'=>558.8, 'width'=>863.6, 'descrip'=>'ANSI D (558.8 x 863.6 mm)'),
array('iso'=>'ANSI_C', 'height'=>431.8, 'width'=>558.8, 'descrip'=>'ANSI C (431.8 x 558.8 mm)'),
array('iso'=>'ANSI_B', 'height'=>279.4, 'width'=>431.8, 'descrip'=>'ANSI B (279.4 x 431.8 mm)'),
array('iso'=>'ANSI_A', 'height'=>215.9, 'width'=>279.4, 'descrip'=>'ANSI A (215.9 x 279.4 mm)'),
);
$filter = "A4";
$filt = array_filter($arr, function($e) { strcasecmp(substr($e['iso'], 0, strlen($filter)), $filter) === 0; });
var_dump($filt);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/KP0Na
function name: (null)
number of ops: 12
compiled vars: !0 = $arr, !1 = $filter, !2 = $filt
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
3 0 E > ASSIGN !0, <array>
21 1 ASSIGN !1, 'A4'
22 2 INIT_FCALL 'array_filter'
3 SEND_VAR !0
4 DECLARE_LAMBDA_FUNCTION '%00%7Bclosure%7D%2Fin%2FKP0Na%3A22%240'
5 SEND_VAL ~5
6 DO_ICALL $6
7 ASSIGN !2, $6
23 8 INIT_FCALL 'var_dump'
9 SEND_VAR !2
10 DO_ICALL
11 > RETURN 1
Function %00%7Bclosure%7D%2Fin%2FKP0Na%3A22%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/KP0Na
function name: {closure}
number of ops: 15
compiled vars: !0 = $e, !1 = $filter
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
22 0 E > RECV !0
1 INIT_FCALL 'strcasecmp'
2 INIT_FCALL 'substr'
3 FETCH_DIM_R ~2 !0, 'iso'
4 SEND_VAL ~2
5 SEND_VAL 0
6 STRLEN ~3 !1
7 SEND_VAL ~3
8 DO_ICALL $4
9 SEND_VAR $4
10 SEND_VAR !1
11 DO_ICALL $5
12 IS_IDENTICAL ~6 $5, 0
13 FREE ~6
14 > RETURN null
End of function %00%7Bclosure%7D%2Fin%2FKP0Na%3A22%240
Generated using Vulcan Logic Dumper, using php 8.0.0
preferences:
171.63 ms | 941 KiB | 22 Q